Second order roulette or gear-in-hoop-in-wheel parametric equation as described in blog post. Click on update to redraw. Scroll down for more controls and examples. Good values for hoop offset h is 0.4 - 0.6, while the pen-hole relative distance p is usually 0.7 - 0.9. Url with current parameters is available below for ctrl-c.
Inversion of frequencies F=(T1/T,T3/T); but T<T1<T3:
Similarity parameters (from theory #2):