|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.sip.ch02.Particle
org.opensourcephysics.sip.ch02.FallingParticle
public class FallingParticle
FallingParticle models a falling ball by subclassing the Particle class.
Constructor Summary | |
---|---|
FallingParticle(double y,
double v)
Constructs a Falling Particle with the given initial conditions. |
Method Summary | |
---|---|
double |
analyticPosition()
Computes the position of the ball at the current time using the analytic solution of the equation of motion. |
double |
analyticVelocity()
Computes the velocity of the ball at the current time using the analytic solution of the equation of motion. |
void |
step()
Steps (advances) the dynamical variables using the Euler method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FallingParticle(double y, double v)
y
- doublev
- doubleMethod Detail |
---|
public void step()
step
in class Particle
public double analyticPosition()
analyticPosition
in class Particle
y0
- doublev0
- double
public double analyticVelocity()
analyticVelocity
in class Particle
y0
- doublev0
- double
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |