D. Design and Thrill of a Straight Stretch Coaster using Trig Functions
In this Maple worksheet, we build a roller coaster using n peak and valley points. Our approach is to determine (n-1) trig functions of the form f(x) = acos(bx+c)+d that connect these points and then to calculate the angles of steepest descent/ascent of each hill and the resulting thrill factor for the coaster.
I. Getting Started
We clear all variables. To avoid multiple solutions, we set the maximum number of solutions variable equal to 1.
> | restart: |
> | _MaxSols:=1: |
II. Data Points
We enter the number of peak and valley points (n) and the x coordinates (xdata), y coordinates (ydata) and slope conditions (slopes) for these points.
In this example , the first peak is at (0,75), then a valley at (50,0), a peak at (100,50) and the last valley at (200,0). Also, since all points are either peak or valley points, then all slope conditions will be zero.
In your work, you should use the collected peak and valley data points from several hills of the Greyhound (Module A) .
> | n:=4: |
> | xdata:=[0,50,100,200]: |
> | ydata:=[75,0,50,0]: |
> | slopes:=[0,0,0,0]: |
III. Connecting Trig Functions
We determine trig functions of the form f(x) = acos(bx+c)+d that connect our peak and valley points. Note that 4 peak and valley points will determine 3 hill pieces. To determine these 3 hill pieces (f1,f2,f3), we simply repeat the procedure from module B. The Maple commands below may easily be incorporated into a "do" loop (see module F for a more advanced Maple worksheet).
For f1(x):
> | f1:=x->a1*cos(b1*x+c1)+d1; |
> | f1p:=D(f1); |
> | s1:=fsolve({f1(xdata[1])=ydata[1],f1p(xdata[1])=slopes[1],f1(xdata[2])=ydata[2],f1p(xdata[2])=slopes[2]},{a1,b1=Pi/(xdata[2]-xdata[1]),c1,d1}); |
> | assign(s1): |
> | f1:=x->a1*cos(b1*x+c1)+d1: |
> | tplot1:=plot(f1(x),x=xdata[1]..xdata[2]): |
For f2(x):
> | f2:=x->a2*cos(b2*x+c2)+d2; |
> | f2p:=D(f2); |
> | s2:=fsolve({f2(xdata[2])=ydata[2],f2p(xdata[2])=slopes[2],f2(xdata[3])=ydata[3],f2p(xdata[3])=slopes[3]},{a2,b2=Pi/(xdata[3]-xdata[2]),c2,d2}); |
> | assign(s2): |
> | f2:=x->a2*cos(b2*x+c2)+d2: |
> | tplot2:=plot(f2(x),x=xdata[2]..xdata[3]): |
For f3(x):
> | f3:=x->a3*cos(b3*x+c3)+d3; |
> | f3p:=D(f3); |
> | s3:=fsolve({f3(xdata[3])=ydata[3],f3p(xdata[3])=slopes[3],f3(xdata[4])=ydata[4],f3p(xdata[4])=slopes[4]},{a3,b3=Pi/(xdata[4]-xdata[3]),c3,d3}); |
> | assign(s3): |
> | f3:=x->a3*cos(b3*x+c3)+d3: |
> | tplot3:=plot(f3(x),x=xdata[3]..xdata[4]): |
And, we display the (n-1) hills pieces.
> | with(plots): |
Warning, the name changecoords has been redefined
> | display(tplot1,tplot2,tplot3); |
The coaster plot looks good. It matches the peak and valley points.
IV. Calculation of Angle of Steepest Descent/Ascent
We need to determine the angles of steepest ascent/descent. We use what we learned from part VI of module B (i.e. for these functions , the x coordinate of the point of steepest ascent/descent is the x coordinate of the midpoint between the peak/valley points)
For f1(x):
> | mdpt1:=.5*xdata[1]+.5*xdata[2]; |
> | slope1:=abs(f1p(mdpt1)); |
> | rangle1:=arctan(slope1); |
> | dangle1:=evalf(rangle1*180/Pi); |
The radian measure (for thrill) is 1.17 and the degree measure (for safety) is 67.
For f2(x):
> | mdpt2:=.5*xdata[2]+.5*xdata[3]; |
> | slope2:=abs(f2p(mdpt2)); |
> | rangle2:=arctan(slope2); |
> | dangle2:=evalf(rangle2*180/Pi); |
The degree measure (for safety) is 57.5
For f3(x):
> | mdpt3:=.5*xdata[3]+.5*xdata[4]; |
> | slope3:=abs(f3p(mdpt3)); |
> | rangle3:=arctan(slope3); |
> | dangle3:=evalf(rangle3*180/Pi); |
The radian measure (for thrill) is 0.66 and the degree measure (for safety) is 38.
V. Safety Restrictions and Thrill Factor
Safety Criteria
For this coaster, the maximum angle of steepest descent/ascent is given by 67 degrees which is less than 80 degrees and so the coaster is SAFE.
Thrill Factor
Now we calculate the thrill of each of the two drops (not of each hill) and the thrill of the coaster.
For the first drop:
> | thrill1:=rangle1*(ydata[1]-ydata[2]); |
For the second drop (third piece):
> | thrill2:=rangle3*(ydata[3]-ydata[4]); |
And the total thrill is
> | thrill1+thrill2; |
> |
VI. Coaster Design
A. Build another straight stretch trig coaster using the collected data points from The Devil (Module A).
B. Build another straight stretch trig coaster using the collected data points from Shivering Timbers (Module A).
C. Keeping in mind the coaster restrictions, design your own trig coaster by modifying the Maple code given above. Your design should be creative, interesting, and as thrilling as possible.