[Contact] [Contributions] [Downloads] [FAQ] [Forum] [Links] [Main] [News] [Project Page] [Status] [Website] [Wiki]

[Action] [Asteroids] [Audio] [Colorizer] [GUI] [Hierarchy] [Input] [Math] [Media] [Physics] [Plugin] [Timer] [Video/Modeler]

Physics

Deimos Physics Library

License: LGPL (license.txt)
API Docs: Can be found here
Changelog: Can be found here

Short Description:
    The Deimos Physics library will eventually handle generalized physical forces, as well as collision detection/handling, all in 3D.

Long Description:
    This is a pure java implementation of a physics system that will (eventually) handle generalized physical forces (like gravity or 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 small number of public classes and interfaces with simple, pluggable APIs.  Unfortunately, some complexity is required.

Status:
    Functional force simulation, simple (still some bugs) sphere-sphere collision detection and handling, no rotational dynamics.  Particle fountains are functional and pretty.

Usage:
    This is a library.  Just put it in the classpath and 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 build 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 provided by:
SourceForge.net Logo