1. Polar Coordinates: This animation demonstrates the idea of the polar graph of a function defined with respect to an angle ("t" here).
2. ```restart: with(plots):

a := -Pi/3: b := Pi:   # theta domain
c := -2: d := 2:       # y range
m := 3.5: n := 24:     # shift between graphs, frames
f := t -> 1/2+cos(t):  # function

an1 := animate([cos(k)*(f(k)+t-t*f(k)),
sin(k)*(f(k)+t-t*f(k)),t=0..1],
k=a..b,frames=n,view=c..d,color=green,
scaling=constrained,tickmarks=[0,0]):
an2 := animate([f(a+t*(k-a))*cos(a+t*(k-a)),
f(a+t*(k-a))*sin(a+t*(k-a)),t=0..1],
k=a..b,frames=n,color=red):
an3 := animate([t*cos(k)*f(k),t*sin(k)*f(k),
t=0..1],k=a..b,frames=n,color=blue):
an4 := animate([cos(a+t*(k-a)),sin(a+t*(k-a)),
t=0..1],k=a..b,frames=n,color=tan):
an5 := animate([m+a+(k-a)*t,f((k-a)*t+a),t=0..1],
k=a..b,frames=n,color=red):
an6 := animate([m+k,t*f(k)+1-t,t=0..1],
k=a..b,frames=n,color=green):
an7 := animate([m+k,t*f(k),t=0..1],k=a..b,
frames=n,color=blue):
an8 := animate([m+a+(k-a)*t,1,t=0..1],k=a..b,
frames=n,color=tan):
an9 := plot([m,t,t=c..d],color=black,
title="POLAR   -   CARTESIAN"):
display(an9,an8,an7,an6,an5,an4,an3,an2,an1);```
3. Cycloids: The curve generated by following a point on a circle as the circle is rolled across a flat surface. The animation starts at time 0 and ends at time q, as defined in the parameters.
4. ```restart: with(plots):

q := 8*Pi/3:        # domain is [0,q]
a := -1: b := q+1:  # graphs [-1,q+1]
c := 0: d := 2:     # range
n := 18:            # frames

an1 := animate([k+cos(t),1+sin(t),t=0..2*Pi],k=0..q,
view=[a..b,c..d],tickmarks=[0,0],frames=n,
scaling=constrained,axes=none,color=blue):
an2 := animate([(k-sin(k))*t+k*(1-t),(1-cos(k))*t+1-t,
t=0..1],k=0..q,frames=n,color=green):
an3 := animate([t*k-sin(t*k),1-cos(t*k),t=0..q],
k=0..1,frames=n,color=red):
an4 := plot(0,x=a..b,color=black):
display(an1,an2,an3,an4);```
5. Hypo- and epi-cycloids: The code shown graphs the hypocycloid created by tracing the path of a point on a circle of radius "b" when it is rolled around on the inside of a circle of radius "a." If you find the image looking "choppy," set "pts" to a larger value. To produce an epicycloid (rolling the circle of radius "b" outside the circle of radius "a"), make b negative and change: "view=[-a..a,-a..a]" in the last line to read: "view=[-a+2b..a-2b,-a+2b..a-2b]".
6. ```restart: with(plots):

a := 7: b := 2:      # outside diam., inside diam.
n := 48: pts := 48:  # frames, plotpoints

an1 := plot([a*sin(t),a*cos(t),t=0..2*Pi],
axes=none, scaling=constrained,color=red):
an2 := animate([(a-b)*sin(b*k)+b*sin(t),
(a-b)*cos(b*k)+b*cos(t),t=0..2*Pi],
k=4*Pi/n..2*Pi,numpoints=pts,frames=n,
color=green):
an3 := animate([(2*Pi-t)/(2*Pi)*(a-b)*sin(b*k)+
t/(2*Pi)*((a-b)*sin(b*k)-b*sin((a-b)*k)),
(2*Pi-t)/(2*Pi)*(a-b)*cos(b*k)+t/(2*Pi)*
((a-b)*cos(b*k)+b*cos((a-b)*k)),t=0..2*Pi],
k=4*Pi/n..2*Pi,numpoints=pts,frames=n,
color=aquamarine):
an4 := animate([(a-b)*sin(b*t*k/(2*Pi))-
b*sin((a-b)*t*k/(2*Pi)),(a-b)*cos(b*t*k/(2*Pi))+
b*cos((a-b)*t*k/(2*Pi)),t=0..2*Pi],k=4*Pi/n..2*Pi,
numpoints=pts,frames=n,color=blue):
display(an1,an2,an3,an4,view=[-a..a,-a..a]);```
7. Curvature and Evolutes: Curvature at a point on a curve is defined mathematically, but it is best imagined as 1/radius of the circle that best fits the curve at that point. The following animation graphs a parametrically defined curve in red and the circle of curvature in green at each point. The centers of these circles of curvature form another curve in blue, called the evolute of the original curve.
8. ```restart: with(plots):

a := -3.5: b := 3.5:           # x range
c := -2.3: d := 2.3:           # y range
p := 0: q := 2*Pi:             # parameter domain
n := 48:                       # frames
xx := t -> cos(t):             # x function
yy := t -> 1.5*sin(t):         # y function

dx := t -> D(xx)(t):           # x function deriv.
dy := t -> D(yy)(t):           # y function deriv.
ddx := s -> subs(t=s,diff(dx(t),t)):
ddy := s -> subs(t=s,diff(dy(t),t)):
k := t -> simplify(abs(dx(t)*ddy(t)-dy(t)*ddx(t))/
sqrt(dx(t)^2+dy(t)^2)^3): # curvature function
r := t -> (dx(t)^2+dy(t)^2)/(dx(t)*ddy(t)-ddx(t)*dy(t)):
cx := t -> xx(t)-dy(t)*r(t):   # evolute x function
cy := t -> yy(t)+dx(t)*r(t):   # evolute y function
an1 := plot([xx(t),yy(t),t=p..q],view=[a..b,c..d],
scaling=constrained,tickmarks=[0,0]):
an2 := animate([cx(i)+cos(t)/k(i),cy(i)+sin(t)/k(i),
t=0..2*Pi],i=p..q,view=[a..b,c..d],frames=n,
color=green):
for i from 1 to n do
an3[i] := plot([cx(t),cy(t),t=p..p+(q-p)*i/n],
view=[a..b,c..d],color=blue):
an4[i] := plot([cx(p+(q-p)*i/n)*t+xx(p+(q-p)*i/n)*(1-t),
cy(p+(q-p)*i/n)*t+yy(p+(q-p)*i/n)*(1-t),
t=0..1],view=[a..b,c..d],color=cyan):
end do:
an5 := plots[display]([seq(an3[i],i=1..n)],insequence=true):
an6 := plots[display]([seq(an4[i],i=1..n)],insequence=true):
display(an1,an2,an5,an6);```
9. Hyperbolic Functions: Here is an example of hyperbolic functions in real life. Imagine dropping a stone into a lake at time 0 and two more "s" seconds later. In this case, if |s| > 2 the waves will not intersect, so a conditional statement (if...) has been used to prevent the output from being worthless. Note that the animation starts at time 0, so if you choose s to be negative, the "second" stones will be dropped before the animation starts. The first frame of the animation may be blank, so let it run even if you think there is nothing there.
10. ```restart: with(plots):

s := 1:             # wave 2 start time
a := -3: b := 3:    # x range
c := -3: d := 3:    # y range
q := 6.5: n := 30:  # stop time, frames

if abs(s) > 2 then s = 0: end if:
f := x -> max(x, 0):
g := x -> max(x, (2 - s)/2):
inv := x -> arccosh(x + s/2):
an1 := animate([k*cos(Pi*t),k*sin(Pi*t),t=-1..1],
k=0..q, axes=none, scaling=constrained,
view=[a..b,c..d], frames=n, color=blue):
an2 := animate([s/2*cosh(inv(g(k-s))*t)+1,
sqrt(4-s^2)/2*sinh(inv(g(k-s))*t),
t=-1..1], k=0..q, frames=n, color=red):
an3 := animate([f(k-s)*cos(Pi*t)-2,f(k-s)*sin(Pi*t),
t=-1..1],k=0..q, frames=n, color=blue):
an4 := animate([-s/2*cosh(inv(g(k-s))*t)-1,
sqrt(4-s^2)/2*sinh(inv(g(k-s))*t),
t=-1..1], k=0..q, frames=n, color=red):
an5 := animate([f(k-s)*cos(Pi*t)+2,f(k-s)*sin(Pi*t),
t=-1..1],k=0..q, frames=n, color=blue):
an6 := animate([0,sqrt(f((k-s)^2-4))*t,t=-1..1],
k=0..q, frames=n, color=red):
display(an1,an2,an3,an4,an5,an6);```