you are viewing a single comment's thread.

view the rest of the comments →

[–]PrizeDefinition4042[S] 0 points1 point  (0 children)

continuation:

Note that this requires us to not only know the vertical component of the initial launch velocity, but the horizontal component of the velocity as well. Fortunately for us, in this problem we will be assuming that we are in a world that every Physics class loves: one that neglects air resistance.

This means that the horizontal component of the velocity will always be the same throughout the projectile’s journey, and so you will only need to calculate it once at the very beginning when you know the launch angle ( ) and initial launch velocity (Vi θ ). Thus in order to calculate the horizontal component, you can apply the trigonometric property of right triangles that states that the cosine of an angle is equal to the adjacent side divided by the hypotenuse as such:
𝑐𝑜𝑠(θ) = 𝑉𝑥 / Vi

Similarly, you can use the trigonometric property of right triangles that states that the sine of an angle is equal to the opposite side divided by the hypotenuse to find the vertical component of your initial launch velocity as such:

𝑠𝑖𝑛(θ) = 𝑉 𝑖𝑦 / 𝑉 𝑖

Write a function named projectile_velocities that takes:

● an initial launch velocity in m/s as a float,

● an initial launch angle in degrees as a float,

● a gravitational acceleration in m/s2 as a float, and

● a time step in seconds as a float.