"""Double pendulum: a chaotic swing, solved once and then played back.
The only asset in the library whose composition comes out of a solver, and
the reason `PhysicsAsset` exists. `-s` renders one frame and never steps
anything, and re-running the solver inside the still walks a different
sequence of steps from the one `wait()` walks: measured on this very
pendulum, the two are 0.24 units apart after a single second and never
converge again, because that is what chaos does to a discrepancy.
So the swing is computed once, in plain Python, and the still, the trail
and the loop all read the same recording back. The renderer never drives
the physics.
Render (the driver does this for every palette; these are for eyeballing):
P=/opt/homebrew/opt/python@3.11/bin/python3.11
ASSET_MODE=still $P -m manim -s -t -r 1600,1600 manim/pendulum.py Pendulum
The full Manim source and the rendered video come with a plan.