Retrograde motion of Mars
> with(plots): with(plottools):
> earth := sphere([0,0,0],.1,color=turquoise,style=point):
>
mars := (t,r1,r2) -> sphere([cos( 2*Pi/r1*t)+.3*cos( 2*Pi/r2*t),
sin(2/r1*Pi*t)+.3*sin(2/r2*Pi*t),0],.06,color=red,style=point):
>
display([seq(display([earth,mars(i,12,6)]),i=0..23) ],
insequence=true, scaling=constrained,axes=boxed);