2D Physics in MASON

By Christian Thompson

The MASON 2D Physics code is a reasonably efficient, lightweight 2D constraint-based rigid body physics simulator written in pure Java. The simulator implements collisions, forces, and constraints such as hinges and pin-joints. Ultimately, we'd like to build a lightweight robotics simulator on top of the physics simulator. We also hope to attach ODE to MASON at some point in the future, likely through ODEJava. But a lightweight simulator has many benefits of its own, not the least of which is portability.

Download the physics code as physics2d.tar.gz or physics2d.zip. You can also peruse the Masters' Project Writeup and Presentation, both of which provide a good introduction to the project and code. Below are two movies made with the simulator.


Download Collisions as a gzipped Quicktime movie. Yes, we notice that the objects sometimes bounce without touching (there's a bit of a buffer region, which we're reducing as we progress).


Download Robots collecting blue balls as a gzipped Quicktime movie.