Diatomic molecule demo
Simulation of a diatomic molecule interacting with a rigid walls.
The mass ratio is 1:4. You may drag either mass at any time.
The bar on the right displays the total kinetic energy. Reinitialize
Script Functions
This example demonstrates the following Animator methods.
- addInteraction(int id1, int id2, String force)
- addConnectionSpring(int id1, int id2)
- setDragable(int id, boolean dragable)
- setForce(int id, String fx, String fy, double x0, double y0, double vx0, double vy0)
- swapZOrder(int id1, int id2)