Tip:
Highlight text to annotate it
X
So now it's time for us to get some practice with an application of the Forward Euler Method.
This time, we define a function for you called trajectory --
that's going to determine the trajectory of a particle.
We've already set the step size, the acceleration to the gravity and the initial speed of the particle.
Inside the definition, we've created an array called angles that's starts out at 20
and increases with increments of 10 up to 70.
This creates a set of angles at which the particle can take off.
Over here, we see an example of what a ballistic trajectory of a particle
with a given initial angle might look like.
The next step is to create variables for position and velocity.
Each of these is an array where the number of rows equals the number of steps
that are going to be taken plus 1 and 2 columns.
Your job is to find equations for the position and velocity of a particle that show how
changing the initial take off angle of the particle changes its trajectory.
Fill in your code here and good luck.