| > | restart; |
| > | with(plots): |
| > | n:=10; |
| > | x:=cos(n*t)-n*cos(t);y:=sin(n*t)-n*sin(t); |
| > | x1:=diff(x,t); y1:=diff(y,t); |
| > | x2:=diff(x1,t); y2:=diff(y1,t); |
| > | w:=x1*y2-y1*x2; v:=x1^2+y1^2; |
| > | r:=v^(3/2)/abs(w); |
| > | xc:=x-v/w*y1; yc:=y+v/w*x1; |
| > | p1:=plot([x,y,t=0..2*Pi],scaling=constrained,color=yellow): |
| > | p2:=animate([xc+r*cos(s),yc+r*sin(s),s=0..2*Pi],t=0..2*Pi,scaling=constrained,color=red,frames=100): |
| > | p3:=animate([(1-s)*xc+s*x,(1-s)*yc+s*y,s=0..1],t=0..2*Pi,scaling=constrained,color=blue,frames=100): |
| > | p4:=plot([xc,yc,t=0..2*Pi],scaling=constrained,color=green): |
| > | display(p1,p2,p3,p4,thickness=3,axes=none); |
| > |