Pendulum on a moving cart
What you are seeing: a frictionless cart of mass constrained to move horizontally, with a rigid pendulum of length and bob mass hanging from a pivot on top of the cart. Classical two-degree-of-freedom Lagrangian system. Both energy and total horizontal momentum are conserved (no external horizontal forces).
Release the pendulum from angle and watch it swing. The cart slides to keep total constant. The traces below show energy drift (tiny under RK4) and the vs cart- phase portrait.
theta_00.80
speed3
WHAT TO TRY
- Vary each control and watch the rail readouts respond.
- Compare the diagnostic plot against the live scene.