I'm interested in the phenomenon of the looping pendulum, which is a system consisting of one large and one small mass connected by a string passing over a rod. In particular, I've been looking at this paper: https://arxiv.org/abs/2103.14752
What I've been struggling to understand is how the position vector of the mass $M_1$ was expressed as
$$\vec{r}_1=(R \cos \theta-\ell \sin \theta) \hat{x}+(R \sin \theta+\ell \cos \theta) \hat{y}$$
on page 3 of the paper. I would greatly appreciate if someone could go through the process by which the position was expressed like this.