the guts of the epicycloid animation
Here are some lines that make up the "guts" of your animation. Adjust to suit your taste. Note that this parameterization starts the point at
when
.
>
R:=2: r:=.5: t:=5*Pi/6:
>
epi := (R,r,t) ->
[(R+r)*sin(t)+r*sin((R+r)*t/r),
(R+r)*cos(t)+r*cos((R+r)*t/r)]:
>
cR :=circle([0,0],R,color=green,thickness=2):
cr := circle([(R+r)*sin(t),(R+r)*cos(t)],r,
color=blue,thickness=2):
l := line([(R+r)*sin(t),(R+r)*cos(t)],epi(R,r,t),color=purple):
g:=plot([op(epi(R,r,s)),s=0..t],color=red):
>
display(cR,cr,l,g,scaling=constrained);