This web-based interactive simulation demonstrates the physics of pendulum waves. Created using pure HTML, CSS, and JavaScript, it visualizes the motion of multiple pendulums of varying lengths and simulates wave-like interference patterns over time.
β Created by: Huzaifa Ahmed Khan π©βπ« Under the Supervision of: Ms. Marium Ghulam Nabi π« Department of Physics, NED University of Engineering & Technology
The motion of each pendulum follows the classical harmonic equation:
Where:
-
$\theta(t)$ β Angular displacement at time$t$ -
$\theta_0$ β Initial angle -
$g$ β Gravitational acceleration -
$L$ β Length of pendulum
By using pendulums of slightly varying lengths, their oscillations fall in and out of phase, creating beautiful wave-like patterns.
-
ποΈ Adjustable parameters:
- Number of pendulums
- Shortest & longest pendulum length
- Gravity
- Initial angle
-
π¨ Toggle motion trails for visual effects
-
π Real-time graph of
$\theta(t)$ for the first pendulum using Chart.js -
π€ Export graph data as:
- PNG image
- CSV data
-
π± Responsive UI (scales well on various screen sizes)
wave-pendulum-simulation/
β
βββ index.html # Main simulation page
βββ style (inline) # Embedded CSS styling
βββ script (inline) # JS logic for pendulum physics, animation & charting
No installations or builds needed. This simulation is pure HTML/CSS/JS.
-
Clone this repository
git clone https://github.com/your-username/wave-pendulum-simulation.git
-
Open
index.htmlin any modern browser
- HTML5
- CSS3
- JavaScript (ES6+)
- MathJax β for LaTeX math rendering
- Chart.js β for plotting angular motion
Export PNG: Download the graph as a.pngimageExport CSV: Download time-angle data for further analysis
This project is for academic and educational purposes. Contact the author if you'd like to reuse or build upon this work.