Pendulum with Direction Field

previous next

Physics-based simulation of a pendulum, showing both a phase graph and the direction field (or slope field) associated with the differential equation.

Click the "Sim" tab to access parameters such as: gravity, mass or friction (damping). Drag the pendulum to change the starting position. Or click below to set some predefined initial conditions.


See the page about the single pendulum for more about how pendulums work and the math behind this simulation. This simulation is identical to that one, but adds a graph of the direction field (AKA slope field) of the differential equation. This direction field is shown overlapping the phase space graph of angular velocity vs. angle. At each point, the path of the pendulum in phase space is along the direction field.

Also available are: open source code, documentation and a simple-compiled version which is more customizable.

Experiments to try:

previous next Valid HTML 4.01