prefuse.util.force |
Utility classes providing a physical force simulation for layout and
animation. Force simulations consist of a series of force functions that
calculate forces acting on data elements, and an integrator that determines
how these calculated forces effect the position and velocity of these elements
over time. The {@link prefuse.util.force.ForceSimulator} class keeps track of
which elements should be included in the simulation, as well as which
{@link prefuse.util.force.Force} functions and
{@link prefuse.util.force.Integrator} are used.
To create your own custom simulations, create a new ForceSimulator instance
and add the desired force functions. Custom force functions can be introduced
by subclassing {@link prefuse.util.force.AbstractForce} or implementing the
{@link prefuse.util.force.Force} interface.
Additionally, the {@link prefuse.util.ui.JForcePanel} user interface component
can be used during development to explore different parameterizations of the
various force functions until a desired behavior is found.
|
Java Source File Name | Type | Comment |
AbstractForce.java | Class | Abstract base class for force functions in a force simulation. |
CircularWallForce.java | Class | Uses a gravitational force model to act as a circular "wall". |
DragForce.java | Class | Implements a viscosity/drag force to help stabilize items. |
EulerIntegrator.java | Class | Updates velocity and position data using Euler's Method. |
Force.java | Interface | Interface for force functions in a force simulation. |
ForceConfigAction.java | Class | Swing Action components that brings up a dialog allowing users to configure
a force simulation. |
ForceItem.java | Class | Represents a point particle in a force simulation, maintaining values for
mass, forces, velocity, and position. |
ForceSimulator.java | Class | Manages a simulation of physical forces acting on bodies. |
GravitationalForce.java | Class | Represents a constant gravitational force, like the pull of gravity
for an object on the Earth (F = mg). |
Integrator.java | Interface | Interface for numerical integration routines. |
NBodyForce.java | Class | Force function which computes an n-body force such as gravity,
anti-gravity, or the results of electric charges. |
RungeKuttaIntegrator.java | Class | Updates velocity and position data using the 4th-Order Runge-Kutta method. |
Spring.java | Class | Represents a spring in a force simulation. |
SpringForce.java | Class | Force function that computes the force acting on ForceItems due to a
given Spring. |
WallForce.java | Class | Uses a gravitational force model to act as a "wall". |