The following code is meant to produce a dynamic graphic of epicycles. (I'm having A LOT of trouble copying my code into this editor so that it can be copied back to Mathematica and run, please let me know if it's not working)
Clear["Global`*"]
T1 = 3;
T2 = 2;
a0 = 4;
a1 = 2;
k0 = (2*Pi)/T2;
k1 = (2*Pi)/T1;
z0 = a0*E^(I*k0*t);
z1 = a1*E^(I*k1*t);
z2 = z0 + z1;
z3 = z0 + z1 + z2;
z4 = z0 + z1 + z2 + z3;
z5 = z0 + z1 + z2 + z3 + z4;
ptsList = {{0, 0}, {Re[N[z0]], Im[N[z0]]}, {Re[N[z1]],
Im[N[z1]]}, {Re[N[z2]], Im[N[z2]]}, {Re[N[z3]],
Im[N[z3]]}, {Re[N[z4]], Im[N[z4]]}, {Re[N[z5]], Im[N[z5]]}};
{Slider[Dynamic[t], {0, 10}], Dynamic[t]}
Dynamic[ptsList]
Dynamic[Graphics[{PointSize[0.03],
Text["{0,0}", ptsList[[1]], Offset[{3, 3}]],
Text["z0", ptsList[[2]], Offset[{3, 3}]],
Text["z1", ptsList[[3]], Offset[{3, 3}]],
Text["z2", ptsList[[4]], Offset[{3, 3}]],
Point[{ptsList[[1]], ptsList[[2]], ptsList[[3]], ptsList[[4]]}],
Circle[ptsList[[1]], a0], Circle[ptsList[[2]], a1],
Line[{ptsList[[1]], ptsList[[3]]}],
Line[{ptsList[[2]], ptsList[[3]]}],
Line[{ptsList[[2]], ptsList[[4]]}]}]]
So far, this code can only make one epicycle, but I want to generalize this process to create a variable number of epicycles, but I've hit an impasse.
Any help is appreciated