Dynamic Planets

Planets

This example is the classical N-body problem where the number of objects can change during the execution.
A new planet is created when the mouse button is pressed. The key 'k' removes the planets in the order of creation and 's' removes the sun. The execution can be suspended and resumed with the key 'p'.
This example has been used in a tutorial for the ReactiveML toplevel (see here).