|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.sip.ch02.FallingBall
public class FallingBall
FallingBall models a falling ball using the Euler algorithm.
Constructor Summary | |
---|---|
FallingBall()
Constructs a FallingBall at x=0 with v=0; |
Method Summary | |
---|---|
double |
analyticPosition(double y0,
double v0)
Computes the position of the ball using the analytic solution of the equation of motion. |
double |
analyticVelocity(double v0)
Computes the velocity of the ball using the analytic solution of the equation of motion. |
void |
step()
Steps (advances) the postion of the ball using the Euler algorithm. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FallingBall()
Method Detail |
---|
public void step()
public double analyticPosition(double y0, double v0)
y0
- doublev0
- double
public double analyticVelocity(double v0)
v0
- double
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |