Question: You will write a script ( . mlx ) to calculate and plot the x , y coordinates of a projectile ( see basic physics

You will write a script (.mlx) to calculate and plot the x,y coordinates of a projectile (see basic physics equations below). Here are the requirements
1. The user will input the starting velocity (from 10-50 m/s) and angle (in degrees from 1-89)
2. The script will determine how long the projectile is in the air, then divide that time into at least 50 internals
3. The script will calculate the initial y velocity and the x velocity (x velocity is constant in this type of motion)
4. The script will calculate the x & y location for each time point from #2 using velocities from #3 and physics relationships below
5. The script will plot both x vs t and y vs t with each plot having properly labeled axes and showing data both as point markers and a line
6. The script will ask the user to identify the maximum y height from the y vs t plot (and check with calculation)
7. The script will have adequate commenting/documentation such that any classmate could run and modify the script easily
Bonus - if your script checks if the input velocity and angle are within bounds and errors/makes them re-input if incorrect
Physics equations nkjkj
initial velocity in y (vy_initial)=(input velocity)* sin (input angle)
velocity in x (vx)=(input velocity)* cos (input angle)- velocity in x is constant in this type of motion
total time projectile is in the air t =2* vy_initial/9.81
x displacement x(t)= vx*t
y displacement y(t)= vy_initial * t -4.9*t^2
max y height =(vy_initial)^2/(2*9.8)

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!