|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.sip.ch02.SHO
public class SHO
SHO models a simple harmonic oscillator.
Constructor Summary | |
---|---|
SHO()
Creates a simple harmonic oscillator at x = 0 with v = 0. |
Method Summary | |
---|---|
double |
analyticPosition(double y0,
double v0)
Computes the position using the given initial position and initial velocity. |
double |
analyticVelocity(double y0,
double v0)
Computes the velocity using the given initial position and initial velocity. |
void |
step()
Steps (advances) the dynamical variables 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 SHO()
Method Detail |
---|
public void step()
public double analyticPosition(double y0, double v0)
public double analyticVelocity(double y0, double v0)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |