Wave engine
A wave-motion particle simulator in Python, powered by Panda3D.

At a glance
- Python, Panda3D
Tags
A wave-motion particle simulator written in Python and rendered with Panda3D. The physical constants (rigidity, time scale, friction) are variables at the top of the code.
How it works
A grid of blocks pulls on its neighbours, with a rigidity and a friction, so that a disturbance propagates through it like a wave. Besides the three constants above, you can change the mass, the spacing between blocks and the global scale, and choose whether a stable frame holds the moving surface, which is worth switching off to see what happens.
The simulation can be computed ahead of time: a number of frames is precomputed, then replayed in 3D with a slider and play, rewind and fast-forward controls, which is how the user interface works from version 0.4. Live display is off by default, so that the calculation is not drawn while it runs.
Version 0.4
Added a dark mode, an improved interface, fixes for some rendering bugs and, most importantly, the precomputing, with a two-window interface. It is considered stable.


