Pendulum Labphase & motion

0.00 s— fps
Loading p5.js…
NORMALIZED PHASE SPEED0—

Green: reference pendulum

How to explore & what the colors mean

Explore the ensemble

Click phase space to set the initial mean angle and angular velocity. Drag the green reference pendulum to set the initial distribution center (release at rest). The green reference starts at the actual samples’ mean initial angle (circular mean) and angular velocity (arithmetic mean). It then evolves independently with the same RK4 solver as every sample. It need not stay at the center of the ensemble. If the initial circular mean is undefined, the reference is unavailable. Each color tracks the same independent pendulum in both views. There are no collisions or interactions.

Restart reuses the seed. Resample changes it. Gravity, length and damping update live without changing the current angles, angular velocities, clock or energy history. Initial-condition controls restart the run; display controls do not. Instantaneous changes to length or gravity can produce energy jumps. Space pauses or resumes outside form controls. Hidden tabs automatically suspend simulation time.

Read the phase portrait

The horizontal axis wraps at ±π; trajectories break at this seam. The vertical axis is angular velocity in rad/s. Heatmap color describes the vector field, not the density of pendulums. With fixed parameters, the arrows and colors remain stationary as the pendulums evolve.

With T = √(L/g), the dimensionless speed is s = √[(Tω)² + (T²α)²]. Colors use log(1+Gs)/log(1+Gsmax), where G is the Advanced log gain, with a time-independent upper bound over the visible range. Changing physical settings or the axis range recalculates that bound.

Model & numerics

θ̈ = −(g/L)sin θ − γθ̇. The pivot is fixed, so the dynamics have no explicit time dependence. Angle is measured from downward vertical. Resistance is viscous angular damping γ in s⁻¹; dry friction is not included.

Fixed-step RK4 at 480 Hz with render interpolation. Time spent in a stalled frame above 100 ms is discarded to avoid a large catch-up burst; the simulation clock shows actual integrated time.