Volatile Prototypes

2011 / fvlib r5: Fast Verlet physics for Processing

3D point-spring solver library for Processing and Java.

fvlib is a minimalistic 3D point-spring solver library for Processing and Java, built with high-performance in mind. It uses Verlet Integration for the calculation of point trajectories and Dynamic Relaxation for the calculation of constraints.

Possible design/optimization-related uses for this could include:

  • A relaxation-based tesselation method.
  • An elementary structural solution approximator, i.e. for determining strains of linear members and truss assemblies.
  • A real-time cloth modeller.
  • A force field-based graph bundler/optimizer.

Performance

Using the 'fast' option (calculation of square roots with one Newton iteration), the library has been tested on a set of 9800 points and 58779 links. Using 15 steps, each iteration was measured to 20-24 msec (using java's System.currentTimeMillis()), on a 2.2GHz Intel Core 2 Duo. In other words, about a million point and spring loops can be performed in realtime on a typical contemporary computer.

A few examples built with Processing are included with the library distribution.

It has been tested on Mac OS X 10.6 and Windows XP with Java 5 r23.

Released under the BSD License.

Topics
Prototypes
Libraries
All