Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python In this exercise, we explore projectile motion, using the turtle module. Consider the motion of a projectile, launched at a velocity vo at an

image text in transcribedimage text in transcribedimage text in transcribedpython

In this exercise, we explore projectile motion, using the turtle module. Consider the motion of a projectile, launched at a velocity vo at an angle o to the horizontal (x-axis). The simplest approximation to the motion of the projectile is when the only force acting on the projectile is its own weight: mg where g is the acceleration due to gravity (9.81m/s2). Using the equations of motion (u(t) - velocity; s - displacement, t - time): v = vo g*t (1) S = So + vo *t 59*** (2) The motion of the projectile can be broken down into two independent compo- nents of the motion: (i) Along the x-axis, with an acceleration ay = 0 and an initial velocity voz = Vo * cos 0 and (ii) Along the y-axis, with an acceleration ay = -9 (the negative sign indicates that it is pointing downwards.) and the initial velocity: voy * sin 8 Along the horizontal and vertical directions: Vj = V0 * cos and (3) = xo + Vo * cos *t. 1 y = yo +V0 * sin *t - Vy = Vo * sin 0 - 9*t and 39*** (4) Using the x and y equations above, plot the trajectory of a turtle launched at an angle 0, and initial velocity vo (entered by the user). To compute cos, sin etc. import math, convert the angle entered in degrees, 0, into radians (@*7/180). Use as: math.cos(0*7/180). The math module expects angles in radians). Fire the projectile from (xo, yo) = (-200,0). Pick a travel time that will (at least) cover the entire range of the 2 motion (experiment to find the right travel time). Compute the (x, y) position at small time increments (using the x and y equations above) making up the total travel time. A convenient way to do this is to use the range function in the form: range (start, stop, step). The step parameter allows you to control the increment (the de- fault increment is 1). (See: it up, Use the turtle stamp() function to leave an impression of the turtle at each time-increment. wc-ran Create lists for x, y and time and append each new 2, y and time value to the respective lists. Print the lists (side-by-side) after the turtle has finished moving Modify your program to compute an estimate of and print the max. dis- tance the turtle travels in the x-direction (the range). The range is found by finding the time at which the y position of the turtle first becomes

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions

Question

Is all Internet training the same? Explain.

Answered: 1 week ago