cubiccoasters.mws

E. Design and Thrill of a Straight Stretch Coaster using Polynomial Functions

In this Maple worksheet, we build a roller coaster using n peak and valley points.  Our approach is to determine (n-1)  cubic polynomials that connect these points and then to calculate the angle of steepest descent/ascent of each hill and 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 vally at (50,0), then another peak at (100,50) and  the last valley is 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 Cubic Polynomials

In this example, we have 4 peak and valley data points.  So we must determine 3 (f1,f2,f3) connecting cubic polynomials.  We do this by simply repeating the approach taken in module C three times.  We determine cubic polynomials of the form f(x) = a*x^3+b*x^2+c*x+d  that connect consecutive peak and valley points.   The following Maple code may easily be incorporated into a "do" loop.

For f1(x):

>    f1:=x->a1*x^3+b1*x^2+c1*x+d1;

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

>    f1p:=D(f1);

f1p := proc (x) options operator, arrow; 3*a1*x^2+2*b1*x+c1 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,c1,d1});

s1 := {a1 = .1200000000e-2, b1 = -.9000000000e-1, d1 = 75., c1 = 0.}

>    assign(s1);

>    f1:=x->a1*x^3+b1*x^2+c1*x+d1;

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

>    tplot1:=plot(f1(x),x=xdata[1]..xdata[2]):

For f2(x):

>    f2:=x->a2*x^3+b2*x^2+c2*x+d2;

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

>    f2p:=D(f2);

f2p := proc (x) options operator, arrow; 3*a2*x^2+2*b2*x+c2 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,c2,d2});

s2 := {a2 = -.8000000000e-3, d2 = 250., b2 = .1800000000, c2 = -12.}

>    assign(s2);

>    f2:=x->a2*x^3+b2*x^2+c2*x+d2;

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

>    tplot2:=plot(f2(x),x=xdata[2]..xdata[3]):

For f3(x):

>    f3:=x->a3*x^3+b3*x^2+c3*x+d3;

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

>    f3p:=D(f3);

f3p := proc (x) options operator, arrow; 3*a3*x^2+2*b3*x+c3 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,c3,d3});

s3 := {a3 = .1000000000e-3, b3 = -.4500000000e-1, d3 = -200., c3 = 6.}

>    assign(s3);

>    f3:=x->a3*x^3+b3*x^2+c3*x+d3;

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

>    tplot3:=plot(f3(x),x=xdata[3]..xdata[4]):

Now we display the three connecting polynomials.

>    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 for each of the three connecting polynomials.  We use what we learned from part VI module C (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 and valley points).

For f1(x):

>    mdpt1:=.5*xdata[1]+.5*xdata[2];

mdpt1 := 25.0

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

slope1 := 2.250000000

>    rangle1:=arctan(slope1);

rangle1 := 1.152571997

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

dangle1 := 66.03751101

The radian measure (for thrill) is 1.15 and the degree measure (for safety) is 66.

For f2(x):

>    mdpt2:=.5*xdata[2]+.5*xdata[3];

mdpt2 := 75.0

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

slope2 := 1.50000000

>    rangle2:=arctan(slope2);

rangle2 := .9827937232

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

dangle2 := 56.30993246

The degree measure (for safety) is 56.

For f3(x):

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

mdpt3 := 150.0

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

slope3 := .750000000

>    rangle3:=arctan(slope3);

rangle3 := .6435011088

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

dangle3 := 36.86989764

The radian measure (for thrill) is .64 and the degree measure (for safety) is 37.

V.  Safety Restrictions and Thrill Factor

Safety Criteria

For this coaster, the  maximum angle of steepest descent/ascent is 66 degrees which is less than 80 degrees and so the coaster is SAFE.

Thrill Factor

Now we calculate the thrill for each of the two drops (not of each hill) and the thrill of the coaster

For first drop:

>    thrill1:=rangle1*(ydata[1]-ydata[2]);

thrill1 := 86.44289978

For the second drop(third piece):

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

thrill2 := 32.17505544

And the total thrill is

>    thrill1+thrill2;

118.6179552

>   

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.