Deimos Physics Library
License: LGPL (license.txt)
Docs: Can be found here
Can be found here
The Deimos Physics library will eventually handle
physical forces, as well as collision detection/handling, all in 3D.
This is a pure java implementation of a physics
system that will (eventually) handle generalized physical forces (like
electormagnetism), rotations, and collisions. What this all boils
down to is rigid body
dynamics and kinematics.
The system can use an RK4 integrator,
Euler integrator, or you can build your own and plug it in.
I recently added support for particle fountains
using subordinate particle systems, to model explosions and other
effects in the game. Subordinate
particle systems are affected by the forces in the base system, as
well as any that are attached to them directly.
The base physics system is meant to be composed of a
number of public classes and interfaces with simple, pluggable
APIs. Unfortunately, some complexity is required.
Functional force simulation, simple (still some
bugs) sphere-sphere collision detection and handling, no rotational
dynamics. Particle fountains are functional and pretty.
This is a library. Just put it in the
use it's classes. Alternatively, you can run the simulator by
typing this on the command line:
java -Xincgc -jar physics.jar scene1.java [scene2.java] [scene3.java]
This will use the given source files as scene
descriptions, similiar to the way the modeler uses Java sources to
models. See the files in the scenes directory for examples of
the format of these files.
The "-Xincgc" option isn't required, but I find
performance is better with it. It causes the garbage collector to
run constantly instead of all at once when memory is full. This
option leads to smoother rendering.
There is also one final option for running the
physics simulator. I've setup a simple demonstration via Java Web
Start here. It will display a
list of scenes. Select one, the window will dissapear and then
you'll need to wait a few seconds for a second window to appear.
This one will have the scene rendered into it.
Hosting for this project generously