Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Projectile Motion Fundamentals | Kinematics and Motion
Python for Physics Students

bookProjectile Motion Fundamentals

Projectile motion describes the movement of an object launched into the air, subject only to gravity (assuming air resistance is negligible). This motion can be understood by splitting it into two independent components: horizontal and vertical. The horizontal motion is uniform (constant velocity), while the vertical motion is uniformly accelerated due to gravity.

The key equations governing projectile motion are:

  • Horizontal position:
    x(t) = v0 * cos(θ) * t

  • Vertical position:
    y(t) = v0 * sin(θ) * t - (1/2) * g * t^2

Where:

  • v0 is the initial speed;
  • θ is the launch angle (from the horizontal);
  • g is the acceleration due to gravity (9.81 m/s²);
  • t is the elapsed time.

These equations allow you to predict the projectile's position at any moment after launch.

1234567891011121314151617181920212223
import numpy as np # Initial conditions v0 = 20.0 # initial speed in m/s theta_deg = 45.0 # launch angle in degrees g = 9.81 # acceleration due to gravity in m/s^2 # Convert angle to radians theta = np.radians(theta_deg) # Time of flight t_flight = 2 * v0 * np.sin(theta) / g # Time intervals t_points = np.linspace(0, t_flight, num=50) # Calculate positions x_points = v0 * np.cos(theta) * t_points y_points = v0 * np.sin(theta) * t_points - 0.5 * g * t_points**2 # Display positions at each time step for t, x, y in zip(t_points, x_points, y_points): print(f"Time: {t:.2f} s, X: {x:.2f} m, Y: {y:.2f} m")
copy

In this code, you first set the initial speed (v0), launch angle (theta_deg), and gravitational acceleration (g). The launch angle is converted to radians for calculation. The total time the projectile spends in the air (t_flight) is computed using the vertical motion formula, considering the time to rise and fall back to the starting height.

You then generate a series of time points from launch (t = 0) to landing (t = t_flight). For each time point, the horizontal position (x_points) is calculated using v0 * cos(θ) * t, reflecting constant horizontal velocity. The vertical position (y_points) is found using v0 * sin(θ) * t - 0.5 * g * t^2, which accounts for the initial upward velocity and the downward pull of gravity. The loop prints the projectile's position at each time step, allowing you to track its path through the air.

123456789
import matplotlib.pyplot as plt plt.figure(figsize=(8, 4)) plt.plot(x_points, y_points, marker="o") plt.title("Projectile Motion Trajectory") plt.xlabel("Horizontal Position (m)") plt.ylabel("Vertical Position (m)") plt.grid(True) plt.show()
copy

1. What factors determine the range of a projectile in the simulation?

2. How does changing the launch angle affect the shape of the trajectory?

3. Fill in the blank: The vertical position of a projectile at time t is given by y = ___ - (1/2)gt^2.

question mark

What factors determine the range of a projectile in the simulation?

Select the correct answer

question mark

How does changing the launch angle affect the shape of the trajectory?

Select the correct answer

question-icon

Fill in the blank: The vertical position of a projectile at time t is given by y = ___ - (1/2)gt^2.

 - (1/2)gt^2
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 4

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Can you explain how the time of flight is calculated?

What happens if I change the launch angle or initial speed?

Can you show how to plot the trajectory of the projectile?

bookProjectile Motion Fundamentals

Свайпніть щоб показати меню

Projectile motion describes the movement of an object launched into the air, subject only to gravity (assuming air resistance is negligible). This motion can be understood by splitting it into two independent components: horizontal and vertical. The horizontal motion is uniform (constant velocity), while the vertical motion is uniformly accelerated due to gravity.

The key equations governing projectile motion are:

  • Horizontal position:
    x(t) = v0 * cos(θ) * t

  • Vertical position:
    y(t) = v0 * sin(θ) * t - (1/2) * g * t^2

Where:

  • v0 is the initial speed;
  • θ is the launch angle (from the horizontal);
  • g is the acceleration due to gravity (9.81 m/s²);
  • t is the elapsed time.

These equations allow you to predict the projectile's position at any moment after launch.

1234567891011121314151617181920212223
import numpy as np # Initial conditions v0 = 20.0 # initial speed in m/s theta_deg = 45.0 # launch angle in degrees g = 9.81 # acceleration due to gravity in m/s^2 # Convert angle to radians theta = np.radians(theta_deg) # Time of flight t_flight = 2 * v0 * np.sin(theta) / g # Time intervals t_points = np.linspace(0, t_flight, num=50) # Calculate positions x_points = v0 * np.cos(theta) * t_points y_points = v0 * np.sin(theta) * t_points - 0.5 * g * t_points**2 # Display positions at each time step for t, x, y in zip(t_points, x_points, y_points): print(f"Time: {t:.2f} s, X: {x:.2f} m, Y: {y:.2f} m")
copy

In this code, you first set the initial speed (v0), launch angle (theta_deg), and gravitational acceleration (g). The launch angle is converted to radians for calculation. The total time the projectile spends in the air (t_flight) is computed using the vertical motion formula, considering the time to rise and fall back to the starting height.

You then generate a series of time points from launch (t = 0) to landing (t = t_flight). For each time point, the horizontal position (x_points) is calculated using v0 * cos(θ) * t, reflecting constant horizontal velocity. The vertical position (y_points) is found using v0 * sin(θ) * t - 0.5 * g * t^2, which accounts for the initial upward velocity and the downward pull of gravity. The loop prints the projectile's position at each time step, allowing you to track its path through the air.

123456789
import matplotlib.pyplot as plt plt.figure(figsize=(8, 4)) plt.plot(x_points, y_points, marker="o") plt.title("Projectile Motion Trajectory") plt.xlabel("Horizontal Position (m)") plt.ylabel("Vertical Position (m)") plt.grid(True) plt.show()
copy

1. What factors determine the range of a projectile in the simulation?

2. How does changing the launch angle affect the shape of the trajectory?

3. Fill in the blank: The vertical position of a projectile at time t is given by y = ___ - (1/2)gt^2.

question mark

What factors determine the range of a projectile in the simulation?

Select the correct answer

question mark

How does changing the launch angle affect the shape of the trajectory?

Select the correct answer

question-icon

Fill in the blank: The vertical position of a projectile at time t is given by y = ___ - (1/2)gt^2.

 - (1/2)gt^2
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 4
some-alt