Two years ago I’ve written a post on building an object-oriented multibody structure in Matlab. The project has since been sleeping, but since my experiments with Processing I decided to implement a comparable structure there. This means:
- A structure that is hopefully easy to expand and modify
- Code that is running in Java (with the possibility to port it to C++ / Arduino) that should be reasonably fast.
- A slightly modified approach compared to my original Matlab implementation (in some cases with clear improvements)
This approach allows a very elegant interface for simulation: Adding an object is just one line of code, as is simulating one timestep: