org.opensourcephysics.sip.ch02
Class Particle

java.lang.Object
  extended by org.opensourcephysics.sip.ch02.Particle
Direct Known Subclasses:
FallingParticle, SHOParticle

public abstract class Particle
extends java.lang.Object

Particle models a one-dimensional trajectory that can be computed analytically and numerically. This class is abstract because the dynamics of the particle's motion is not yet known.


Constructor Summary
Particle()
          Constructs a Particle.
 
Method Summary
protected abstract  double analyticPosition()
          Computes the position at the current time using the analytic solution.
protected abstract  double analyticVelocity()
          Computes the velocity at the current time using the analytic solution.
protected abstract  void step()
          Steps (advances) the dynamical variables using a numeric method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Particle

public Particle()
Constructs a Particle.

Method Detail

step

protected abstract void step()
Steps (advances) the dynamical variables using a numeric method.


analyticPosition

protected abstract double analyticPosition()
Computes the position at the current time using the analytic solution.

Returns:
double

analyticVelocity

protected abstract double analyticVelocity()
Computes the velocity at the current time using the analytic solution.

Returns:
double