Implement framework for particle simulation (work in progress).

Add support for visual simulation.
Fixes related to particle movement.
Add simulation cases.