Question: Assignment: Finding Zeros Graphically Write a program to estimate the proper launch angle for a projectile launched with velocity magnitude v i m s ,

Assignment: Finding Zeros Graphically Write a program to estimate the proper launch
angle for a projectile launched with velocity magnitude vims, at a target h
m below, and Rm away from the launch point by graphically determining the
zeros of Equation 3. You will provide the initial values when prompted.
As always,
from pylab import *
Define a function which will pass an array of launch angles and return an
array of values for the expression on the left side of the equal sign of Equation 3,
each element of which corresponds to an element of the launch angle array.
Make the program input values (all float types) for vi,h, and R.
[Note: The input instruction in python3 returns only strings, whereas in
python2 it returned a "best guess" as to the type. In python3, then, the in-
struction needs its return type changed (the technical term is "cast"). So, for
example, if you want the input stored as an integer:
aninteger = int(input("type a number "))
or, as a float (real number):
afloat = float(input("type another number "))
Create an array of 100 launch angle values between 0 and 38(the curve
blows up at 2-try it) using the linspace function.
Plot each returned function value (ordinate) against launch angle (abscissa,
the horizontal or x-axis):
plot(theta, function(theta)).
[labels]
show()
Read from the plot (using the zoom and pan utility in the plot window, if
necessary) the angle(s) where the curve crosses zero on the ordinate (y-axis).
(Grid lines, which may help the determination, can be added to the plot with
the instruction grid(True) before issuing the show() instruction.) Report this
value (which will be in radians) to two decimal places for:
h=1.2m,R=2.5m, and vi=4.8ms.
Then play around and see which initial values near these never give zeros
and therefore can never reach the target. Report the values you come up with.
Consider an object released from rest (i.e,v(0)=0ms) high enough from the
surface of a planet to fall for 5 seconds (that is,0t5; recall from the first
assignment how to create an ordered list of numbers between two values; in this
case, make the list 100 numbers long between 0 and 5 seconds). Consider the
highest point y(0)=0m. Note also that python variables do not distinguish a
lists from a single value (which afterall is a list with one element).
Write a program which contains two functions, a) velocity as a function
of time, t, and value of acceleration due to gravity, g, and b ) position as a
function of time, t, and value of acceleration due to gravity, g. These should be
very simple functions with two passed arguments and only a return expression
instruction in the body.
Also, include an input instruction for the value of the acceleration. Run
the program three times with three different values for the acceleration due to
gravity, g :
i. the nominal value of g on earth;
ii. the nominal value of g on the moon; and
iii. the nominal value of g on mars.
Then:
You should be able to determine with a single print instruction the min-
imum height above the surface the object must be released in order that
it drops for 5 seconds. Set up your program to do this and submit the
answers (3 of them, one for each acceleration).
Plot and submit velocity- and position-versus-time graphs for each accel-
eration, being sure to title each plot and label each axis properly, including
the correct units (a total of 6 plots).
Assignment: Finding Zeros Graphically Write a

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 Programming Questions!