// the find
shiffman/Box2D-for-Processing
Processing JBox2D helper library and examples
A thin Processing wrapper around JBox2D, Daniel Shiffman's companion library to his Nature of Code book. It handles the coordinate system conversion between Processing's screen pixels and Box2D's meter-based world, which is the main annoyance when using JBox2D directly. Primarily a teaching tool, not a production physics library.
The coordinate conversion helpers (pixelsToWorld, worldToPixels) are the right abstraction — Box2D's unit system is a genuine footgun and having it handled transparently makes the physics feel correct without manual fiddling. The example set covers the core joint types (revolute, distance), collision listeners, and soft-body approximations, which maps well to what beginners actually want to build. It ships a prebuilt JAR so Processing users don't need to deal with Maven or classpaths.
JBox2D 2.3.1-SNAPSHOT is the dependency — that's a snapshot from roughly 2014, and the Java Box2D ecosystem moved on without this library following. The wrapper itself is two Java files totaling maybe 400 lines; anyone hitting an edge case in fixture filtering, sensors, or continuous collision detection is immediately thrown back to raw JBox2D with no help. The download link points to a Netlify archive and the library hasn't shipped a release in years, so there's no path to getting a fix if something breaks on a newer Processing version.