Analytical mechanics
Liouville’s theorem
Illustrate Liouville's theorem: Hamiltonian flow preserves phase-space volume (). Observe the orbit winding on a 2-dimensional invariant torus and vary the frequency ratio to see the orbit structure change while the torus — a level set of the constants of motion — stays invariant.
Equipment
- 3D torus canvas with the orbit winding around it (drag to rotate, arrow keys change the view)
- Slider “Tỉ lệ quấn ω₂/ω₁” (readout 0.xx–1.70)
- “Tạm dừng / Chạy tiếp” button
- Readout describing the torus as a 2-dimensional level set of an integrable system
Procedure
Observe the orbit on the torus
Watch the red curve wind around the torus surface in the canvas; drag or use the arrow keys to rotate the view. The readout notes that the torus illustrates a 2-dimensional level set of a two-degree-of-freedom integrable system — the surface const, const. Every initial point on this surface stays on it: the phase flow preserves both the set and its volume.
Change the winding ratio ω₂/ω₁
Move the “Tỉ lệ quấn ω₂/ω₁” slider and watch the readout beside it (shown as value/100). When the ratio is near simple rationals (0.50, 1.00, 1.50) the orbit nearly closes after a few turns; an irrational ratio makes the curve cover the torus densely. Press “Tạm dừng” to inspect the orbit shape, then “Chạy tiếp” to resume.
Connect to phase-volume conservation
Note that whatever the ω₂/ω₁ ratio, the curve stays confined to the same torus — it neither spills off nor collapses to a point. This pictures two results: torus invariance (because the actions are conserved) and Liouville's theorem preserving phase volume, . Compare two far-apart ratio values and predict that at an irrational ratio the orbit will fill the torus.