Example 4.4.2

This notebook shows an animation for example 4.4.2 in the text, which involves rotating a curve around a point.  You may enter any curve you want in terms of parametric coordinates (the functions for the x- and y- coordinates must be in terms of t) as well as a center for the rotation.  You may change the angle the curve is rotated through via the slider, which ranges over the angles from 0 to 2π.

DisplayRotatedCurve[pt_, theta_, curve_,{tmin_,tmax_}]:= 
Block[ {newcurve,t,xmax,xmin,ymax,ymin,theta1,maxmess,maxr},
rotcurve={{Cos[theta],-Sin[theta]},{Sin[theta], Cos[theta]}}. (curve-pt)+pt;
newcurve={{Cos[theta1],-Sin[theta1]},{Sin[theta1], Cos[theta1]}}. (curve-pt)+pt;
maxmess=Norm[curve-pt];
maxr=FindMaximum[{maxmess, tmin≤ t ≤ tmax},t][[1]]+1;
xmax=pt[[1]]+maxr;
xmin=pt[[1]]-maxr;
ymax=pt[[2]]+maxr;
ymin=pt[[2]]-maxr;
Return[ Show[ParametricPlot[ {curve,rotcurve}, {t,tmin,tmax}], Graphics[ {PointSize[.03], Point[pt]}], PlotRange->{{xmin,xmax}, {ymin,ymax}}, AxesOrigin->{0,0}]]
]

Manipulate[DisplayRotatedCurve[pt,z, {curve1,curve2},trange],{{curve1,(3 Cos[4t]+2)Cos[t]+5,"Parametric Curve X:"}},
{{curve2, (3 Cos[4t]+2)Sin[t]+12,"Parametric Curve Y:"}},
{{trange,{0,2Pi},"Range of t-values"}},{{pt,{-4,-9},"Center of Rotation"}},{{z,0,"Angle of Rotation"},0,2Pi,Pi/24}, SaveDefinitions->True]