Interactive Presentation with Animations
Simple Harmonic Motion (SHM) is a fundamental concept in physics that describes the oscillatory motion of systems where the restoring force is directly proportional to the displacement. This type of motion is ubiquitous in nature and technology.
In this interactive presentation, we'll explore the mathematical foundations of SHM, visualize the relationships between displacement, velocity, and acceleration, and verify the phase differences through Python simulation.
Explore the governing equations of SHM and understand the relationships between displacement, velocity, and acceleration.
Discover the constant phase relationships in SHM and how they manifest in oscillatory systems.
Implement SHM equations in Python and visualize the results with interactive plots and animations.
The regular swinging of a pendulum in clocks is a classic example of SHM, providing accurate timekeeping.
Vibrating strings in instruments like guitars and violins exhibit SHM, producing musical tones.
Car suspension systems use springs that follow SHM principles to absorb shocks and provide comfort.
Buildings are designed to withstand seismic waves, which often exhibit SHM characteristics.
Meet the Team
Project Overview
Basics & Objectives
Governing Theory
Relationships
Code Foundation
Calculation & Plot
Visual Analysis
Phase Confirmation
Impact Analysis
Key Findings
→ Next Page
← Previous Page
Space or click to advance
Tap anywhere to create interactive boxes!
Meet our dedicated team members
Team Project - Simple Harmonic Motion Visualization
Modeling Displacement, Velocity, and Acceleration
Exploring phase relationships and oscillatory behavior through mathematical modeling and Python simulation
Current Date: 2025-11-17
x(t) = A cos(ωt + φ)
Position as a function of time
v(t) = -Aω sin(ωt + φ)
First derivative of displacement
vmax = Aω
a(t) = -Aω² cos(ωt + φ)
Second derivative of displacement
amax = Aω²
The simulation relies on two essential Python libraries:
Numpy
For efficient numerical operations
Matplotlib.pyplot
For generating plots
Import statements:
import numpy as np import matplotlib.pyplot as plt
Python 3.x is recommended for this simulation
Key physical and simulation parameters:
A = 1.0 # Amplitude (m) f = 0.5 # Frequency (Hz) omega = 2 * np.pi * f # Angular frequency (rad/s) phi = 0 # Phase constant (rad) t_max = 10 # Total time (s) num_points = 500 t = np.linspace(0, t_max, num_points) # Time array
Maximum displacement
Oscillation frequency
Angular frequency
Total simulation time
Displacement, velocity, and acceleration are calculated using the SHM equations derived from Hooke's Law.
Three subplots are created to visualize each quantity. Each plot has appropriate labels and a legend.
Color coding distinguishes between the three quantities (blue for displacement, orange for velocity, red for acceleration).
Grid lines enhance readability, and tight_layout() ensures proper spacing.
The Python simulation generated three sinusoidal curves representing displacement, velocity, and acceleration over time for an oscillating system with:
Amplitude: 1.0 m
Max: π m/s
Max: π² m/s²
All three quantities exhibit pure sinusoidal patterns
Displacement and velocity are π/2 radians out of phase
Acceleration leads displacement by π radians
The simulation confirms the theoretical phase relationships between displacement, velocity, and acceleration in SHM:
When displacement reaches max amplitude, velocity is zero
When displacement crosses zero, velocity reaches max
Velocity leads displacement by π/2 radians (90°)
When velocity reaches max amplitude, acceleration is zero
When velocity is zero, acceleration reaches max
Acceleration leads velocity by π/2 radians (90°)
When displacement is max positive, acceleration is max negative
When displacement is max negative, acceleration is max positive
Acceleration is π radians (180°) out of phase with displacement
These visual observations directly confirm the theoretical phase differences derived from the mathematical equations of SHM
The initial phase constant (φ) in the SHM equations:
x(t) = A cos(ωt + φ)
v(t) = -Aω sin(ωt + φ)
a(t) = -Aω² cos(ωt + φ)
Positive φ: Shifts all curves to the left
Negative φ: Shifts all curves to the right
Despite the horizontal shifts, the relative phase relationships remain constant:
Velocity leads displacement by 90°
Acceleration leads velocity by 90°
This project successfully modeled Simple Harmonic Motion (SHM) using Python, providing a clear simulation of displacement, velocity, and acceleration. The visualization accurately depicted the sinusoidal nature of these quantities and effectively verified their constant phase relationships, thereby aligning with established physical theory.
Python code successfully generated sinusoidal patterns for displacement, velocity, and acceleration, accurately representing SHM behavior.
Analysis confirmed theoretical phase differences: velocity leads displacement by 90°, acceleration leads velocity by 90°, and acceleration is 180° out of phase with displacement.
Initial phase constant (φ) shifts all curves horizontally but does not alter the fundamental phase relationships between displacement, velocity, and acceleration.
The project effectively used Python with NumPy for calculations and Matplotlib for visualization, creating an intuitive understanding of SHM behavior.
Theory
Simulation
Analysis
Insight
We hope this presentation provided valuable insights into Simple Harmonic Motion