You are talking about prolate epicycloid. If you take function $f(t) = x^2 + y^2$:
$$ f(t) = a^2 +(R+r)^2 - 2a(R+r)\cos\left(\frac Rrt\right) = A - B\cos \omega t $$
You can find the period of the function, maximal and minimal value of the function this will give you all the parameters.
In other words, you find the angle $\theta$ between to successive points closest to origin, you find the minimal and maximal distances to origin $D$ and $d$:
$$ R/r = 2\pi/\theta,\qquad D = a+R+r,\qquad d = R+r-a,\\\ a = \frac{D+d}2,\qquad R= \frac{D-d}{2+\theta/\pi},\qquad r=\frac{D-d}{4\pi/\theta+2} $$