Question: python 3 Plot the trajectory of a ball The formula for the trajectory of a ball is given by f(x)=xtan0-2-cos20 where x is a coordinate

python 3 Plot the trajectory of a ball The formula for thepython 3

Plot the trajectory of a ball The formula for the trajectory of a ball is given by f(x)=xtan0-2-cos20 where x is a coordinate along the ground, g-9.81 is the acceleration due to gravity, vo is the magnitude of the initial velocity which makes an angle 0 with the x-axis, and (0, yo) is the initial position of the ball. Write a program to calculate the trajectory y =f(x) for 0 x 16, with yo = 10,= 10, = 50 . (Do Python trigonometric functions accept radians or degrees?) Let x vary between 0 and 16 with 101 points. You will need to: plot the trajectory data using a blue solid line (-) change the plot range to match the specification above for 0 where you provide a and b) y 16 and for x (use the plt.yLin( a, b ) function or its counterpart for x , . add axes labels to your plot, 'position x' and'height y' Your submission should include a plot. Make sure to import matplotlib.pyplot as plt. Use plt.plot but not plt.show in your submission. This assignment is based on Langtangen, Exercise 5.13.) Plot the trajectory of a ball The formula for the trajectory of a ball is given by f(x)=xtan0-2-cos20 where x is a coordinate along the ground, g-9.81 is the acceleration due to gravity, vo is the magnitude of the initial velocity which makes an angle 0 with the x-axis, and (0, yo) is the initial position of the ball. Write a program to calculate the trajectory y =f(x) for 0 x 16, with yo = 10,= 10, = 50 . (Do Python trigonometric functions accept radians or degrees?) Let x vary between 0 and 16 with 101 points. You will need to: plot the trajectory data using a blue solid line (-) change the plot range to match the specification above for 0 where you provide a and b) y 16 and for x (use the plt.yLin( a, b ) function or its counterpart for x , . add axes labels to your plot, 'position x' and'height y' Your submission should include a plot. Make sure to import matplotlib.pyplot as plt. Use plt.plot but not plt.show in your submission. This assignment is based on Langtangen, Exercise 5.13.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!