Class Index | File Index

Classes


Class pv.Force.drag


Extends pv.Force.
Implements a drag force, simulating friction. The drag force is applied in the opposite direction of the particle's velocity. Since Position Verlet integration does not track velocities explicitly, the error term with this estimate of velocity is fairly high, so the drag force may be inaccurate.
Defined in: DragForce.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructs a new drag force with the specified constant.
Method Summary
Method Attributes Method Name and Description
 
apply(particles)
Applies this force to the specified particles.
 
Sets or gets the drag constant, in the range [0,1].
Class Detail
pv.Force.drag(k)
Constructs a new drag force with the specified constant.
Parameters:
{number} k
the drag constant.
See:
#constant
Method Detail
apply(particles)
Applies this force to the specified particles.
Parameters:
{pv.Particle} particles
particles to which to apply this force.

{pv.Force.drag} constant(x)
Sets or gets the drag constant, in the range [0,1]. The default drag constant is 0.1. The drag forces scales linearly with the particle's velocity based on the given drag constant.
Parameters:
{number} x
the new drag constant.
Returns:
{pv.Force.drag} this, or the current drag constant.

Documentation generated by JsDoc Toolkit 2.3.2 on Fri May 28 2010 10:13:28 GMT-0700 (PDT)