WEBGPU ENGINE
RK4 INTEGRATION
WebGPU Context Active
Parameters
Initial Angle (θ₀)45°
String Length (L)5.0 m
Gravity (g)9.81 m/s²
Mass (m)2.0 kg
Damping (b)0.00
Angle (θ)
0.0°
Ang. Vel. (ω)
0.00 rad/s
Kinetic E.
0.0 J
Potential E.
0.0 J
Energy Distribution
Kinetic E. 0%Total E. 0.0JPotential E. 0%
Live Equation
θ¨=−5.09.81sinθLg=1.96s−2Tsmall≈4.486s
θ vs t
Governing Dynamics
A simple pendulum consists of a point mass m suspended by a massless string of length L in a uniform gravitational field g.
dt2d2θ+Lgsinθ=0
For small angles, the approximation sin(θ) ≈ θ simplifies to simple harmonic motion. The period becomes independent of amplitude:
T=2πgL
This simulation integrates the exact non-linear equation using the Runge-Kutta 4th Order (RK4) method, allowing accurate simulation of large amplitudes and full swings, with realistic air drag.