#Header Begins--Do not remove################################################## # # Maple code to plot trochoidal functions. # # (c) Eugene Fiume, University of Toronto, 1995. # # You are permitted to use this code for noncommercial, educational # purposes only. This header must not be removed from this file. # #Header Ends--Do not remove#################################################### # # First, the x and y parametric functions. # x := proc(a,r,u) a*u - r*sin(u); end: y := proc(r,u) r*cos(u) end: # # Just plot the parametric functions x,y. # plotXY := proc(a,r) local u; plot( {x(a,r,u), y(r,u)}, u=0..4*Pi, title=`Parametric functions x and y` ); end: # # Plot the resulting trochoid. # plotTrochoid := proc(a,r) local u; plot( [x(a,r,u), y(r,u), u=0..4*Pi], title=`Trochoid`); end: # # Plot everything together. # plotAll := proc(a,r) local u; plot( {[x(a,r,u), y(r,u), u=-Pi..6*Pi], x(a,r,u), y(r,u)}, u=0..4*Pi, title=`Both the trochoid and its parametric functions`); end: # # Examples: # # plotAll(0.75, 3.0); # gives Figure 1.7