DGS Studio

Physics Simulations

Double Pendulum

Watch nonlinear motion, a second-mass trail, energy, and an optional chaos comparison.

double_pendulum() is one two-link pendulum. The lower mass traces a path that is already non-repeating for ordinary starts, and an optional comparison shows a second pendulum with a slightly different start.

Energy is tracked so you can see the numerical drift. The trail belongs to the second mass. This single pendulum is the building block of the chaos-pendulum fan, which runs many copies side by side.

Equation

double_pendulum()

What the simulation is integrating

Physics examples are simulations with a fixed mathematical model. Generate Graph starts the scene and its controls. It does not fit a curve through measured data. Sliders and presets change initial conditions or parameters that the integrator already understands.

Read the conserved quantities and the trails, not only the moving shape. A chaotic system can look smooth for a short time and then diverge. A small change in the input, such as a count or a separation, is part of the example rather than a different kind of physics.

Reading the input

Try a change

Generate Graph starts the simulation that this command names. Playback controls belong to that scene. The expression does not become a static y = f(x) plot.

Edit and generate

Generate Graph opens the studio homepage and runs this field. Open in DGS Studio loads the same text and waits for you to generate it. The equation is sent once, as a query parameter.

Related examples