trigcoasters.mws

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;

f1 := proc (x) options operator, arrow; a1*cos(b1*x+c1)+d1 end proc

>    f1p:=D(f1);

f1p := proc (x) options operator, arrow; -a1*sin(b1*x+c1)*b1 end proc

>    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});

s1 := {d1 = 37.50000000, b1 = .6283185307e-1, c1 = -25.13274123, a1 = 37.50000000}

>    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;

f2 := proc (x) options operator, arrow; a2*cos(b2*x+c2)+d2 end proc

>    f2p:=D(f2);

f2p := proc (x) options operator, arrow; -a2*sin(b2*x+c2)*b2 end proc

>    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});

s2 := {a2 = 25.00000000, b2 = .6283185307e-1, c2 = -31.41592654, d2 = 25.00000000}

>    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;

f3 := proc (x) options operator, arrow; a3*cos(b3*x+c3)+d3 end proc

>    f3p:=D(f3);

f3p := proc (x) options operator, arrow; -a3*sin(b3*x+c3)*b3 end proc

>    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});

s3 := {d3 = 25.00000000, a3 = -25.00000000, b3 = .3141592654e-1, c3 = 6.283185307}

>    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);

[Maple Plot]

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];

mdpt1 := 25.0

>    slope1:=abs(f1p(mdpt1));

slope1 := 2.356194490

>    rangle1:=arctan(slope1);

rangle1 := 1.169422825

>    dangle1:=evalf(rangle1*180/Pi);

dangle1 := 67.00299232

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];

mdpt2 := 75.0

>    slope2:=abs(f2p(mdpt2));

slope2 := 1.570796327

>    rangle2:=arctan(slope2);

rangle2 := 1.003884822

>    dangle2:=evalf(rangle2*180/Pi);

dangle2 := 57.51836342

The degree measure (for safety) is 57.5

For f3(x):

>    mdpt3:=.5*xdata[3]+.5*xdata[4];

mdpt3 := 150.0

>    slope3:=abs(f3p(mdpt3));

slope3 := .7853981635

>    rangle3:=arctan(slope3);

rangle3 := .6657737501

>    dangle3:=evalf(rangle3*180/Pi);

dangle3 := 38.14602598

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]);

thrill1 := 87.70671188

For the second drop (third piece):

>    thrill2:=rangle3*(ydata[3]-ydata[4]);

thrill2 := 33.28868750

And the total thrill is

>    thrill1+thrill2;

120.9953994

>   

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.