| Package | flare.physics |
| Class | public class SpringForce |
| Implements | IForce |
Spring instance in a simulation and
computes the spring force between the attached particles. Spring forces
are computed using Hooke's Law plus a damping term modeling frictional
forces in the spring.
The actual equation is of the form: F = -kd - L) + av1 -
v2), where k is the spring tension, d is the distance between
particles, L is the rest length of the string, a is the damping
co-efficient, and v1 and v2 are the velocities of the particles.
| Method | Defined by | ||
|---|---|---|---|
|
apply(sim:Simulation):void
Applies this force to a simulation.
| SpringForce | ||
| apply | () | method |
public function apply(sim:Simulation):voidApplies this force to a simulation.
Parameterssim:Simulation — the Simulation to apply the force to
|