0% found this document useful (0 votes)
10 views2 pages

Import The Numpy and Matplotlib

about python code

Uploaded by

Shweta Meena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Import The Numpy and Matplotlib

about python code

Uploaded by

Shweta Meena
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

AIM:

To generate data for coordinates of a projectile and plot


the trajectory. Determine the range, maximum height and
time of flight for a projectile motion.
ALGORITHM:
- Import the numpy and matplotlib.pyplot modules.
- Define the parameters of the system, such as the mass,
the spring constant, the damping coefficient, the initial
position and velocity, and the time interval.
- Define the equations of motion for the damped harmonic
oscillator, which depend on the type of damping. You can
use the equations given in [this source] or derive them
yourself.
- Solve the equations of motion numerically using a
suitable method, such as the Runge-Kutta method. You
can use the code given in [this source] as a reference or
write your own code.
- Plot the position and velocity of the mass as a function of
time using matplotlib.pyplot. You can also plot the phase
space diagram, which shows the position and velocity as a
parametric curve.
- Adjust the values of the damping parameter and the
angular frequency to see how they affect the motion. You
can also compare the results for different types of
damping
FLOW CHART
5IJM6555

You might also like