J3DWorkbench V3.1.0 is here, with MacOS X support & simple collision physics

J3DWorkbench V3.1.0 is available on Sourceforge

Version 3.1.0 of J3DWorkbench has been released, representing another important milestone in stablity and functionality. In addition, the MacOS X version (Carbon) has now been tested, thanks to VirtualBox by Oracle (Sun).

Collision Physics

As always, J3DWorkbench tries to take over where Java 3D leaves off. Collision detection is largely improved in v3.1, including parameterized mesh deformation. The calculations done are gross generalizations of physical collision, and are not intended to model actual tensile behavior. The framework allows the user to set physical properties on Shape3D objects:

  • Virtual Mass (kg)
  • Hardness coefficient
  • Elasticity coefficient

'Virtual mass' refers to an arbitrary mass value used in simple calculations for the Momentum and Kinetic Energy value of a moving object. 'Hardness' is primarily used for inelastic collisions (mesh deformations), while 'elasticity' is used for elastic collisions.

Inelastic Collisions

With J3DWorkbench's improved collision detection, a moving object with enough virtual energy can cause 3D mesh deformation when colliding with another object that is so configured. The amount of this plastic deformation is calculated as a ratio between the effective transfer energy of the moving 'subject', to the 'resistance' of the 'object' of the collision.

'Transfer' energy denotes the energy that can be transfered to the object in order to deform it.  It is calculated as a small fraction of the kinetic energy (KE =1/2mv2):

Effective kinetic energy = KE * density * hardness / (speed of light2)

I'll admit, this a very loose interpretation of Einstein's E=mc2! But in fact, it gives visually and conceptually acceptable results in a deformation simulation. The effective kinetic energy is then further divided by the number of impact points (1-4, detected by J3DWorkbench's collision detection mechanism). This is because the energy delivered to the object at each point impact point is a fraction of total effective kinetic energy.

The object's resistance is calculated simply as its (density * hardness) value.

Elastic Collisions

Using the principal of conservation of momentum, version v3.2 of J3DWorkbench will simulate simple elastic collisions. For example, a perfectly elastic object colliding with a rigid inelastic body bounces off and away with the same velocity, but in the opposite direction. However, two freely moving bodies with different masses and / or velocities colliding together follow a more complex equation derived from the above; that is p(initial) = p(final).

Collision physics concepts and some basic equations were validated using a great educational site, hyperphysics.