| > | restart; |
| > | with(plots); |
Warning, the name changecoords has been redefined
| > | n:=-3; |
| > | 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; |
| > | r:=(x1^2+y1^2)^(3/2)/abs(w); |
| > | xc:=x-(x1^2+y1^2)/w*y1; |
| > | yc:=y+(x1^2+y1^2)/w*x1; |
| > | p1:=plot([x,y,t=0..2*Pi],scaling=constrained): |
| > | p2:=animate([xc+r*cos(s),yc+r*sin(s),s=0..2*Pi],t=0..2*Pi,scaling=constrained,frames=100,color=blue): |
| > | p3:=animate([(1-s)*xc+s*x,(1-s)*yc+s*y,s=0..1],t=0..2*Pi,scaling=constrained,frames=100,color=green): |
| > | p4:=plot([xc,yc,t=0..2*Pi],scaling=constrained,color=black): |
| > | display(p1,p2,p3,p4,axes=none,thickness=3); |
| > |
| > |