Friday, June 30, 2017

Trajectories

Rocket Launch, Night, Trajectory, Spacex  Do you realize how often students use an instinctual knowledge of math to calculate the trajectory path for the game they are playing?  Watch them!  They use it so much.

I've done it in when playing Angry Birds.  I aim and hope but depending on whether its too high or low, I readjust by eyeballing it.  After a while I become quite good at it but not perfect.

My students do the same thing with their games involving some sort of projectile.  They try again and again until they get it.  If the score is too low, they redo it just like me.

My first thought is they are using some sort of quadratic but programmers may not think that way when they create an app.  So if they don't use the quadratic, what do they use?  Think physics with the two vectors that help locate the position of the object along its trajectory.  These games use the projectile motion formulas and trajectory formulas.

The various formulas are as follows:
Horizontal distance = the velocity along the x-axis * time.
Horizontal velocity = the initial velocity along the x - axis.
Vertical distance = the velocity along the y-axis * time minus 1/2 gt^2
Vertical velocity = the initial velocity along the y-axis minus gt.

Then there are these more specific ones:
Time of flight is t = (2*Vo*Sinx)/g  where Vo is the initial velocity and sinx is component along the y axis and is usually in degrees. G is gravity or 9.8 m/s/s
Maximum Height is H = (Vo^2* Sin^2x)/2g
Range is R = (Vo^2*Sin2x)/g.

This site has a great example of the coding to show how programmers code projectile motion in games such as Angry Birds.  This type of activity, especially if you provide the coding and the math, students can compare and see how the two relate.  A programmer I know is always telling me that one should "borrow" already written code rather than starting from scratch as it is faster.

I would love to incorporate this type of project in my trig class so they experience a real life situation that uses trig.  In addition, it would be good to show substitutions and such but unfortunately, we are not allowed to teach coding in school because it is not seen as an important skill. I disagree but can't do anything about it.

Let me know your thoughts on the topic.  I love hearing from people.