|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.sip.ch05.Planet
public class Planet
Planet models and displays the motion of a planet using an inverse square force law. Students should test other ODESolvers in the Numerics package.
| Constructor Summary | |
|---|---|
Planet()
|
|
| Method Summary | |
|---|---|
void |
doStep()
Steps the differential equation and appends data to curve. |
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the planet and its path. |
void |
getRate(double[] state,
double[] rate)
Gets the rate using the given state. |
double[] |
getState()
Gets the state |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Planet()
| Method Detail |
|---|
public void doStep()
public void getRate(double[] state,
double[] rate)
getRate in interface ODEstate - the staterate - the resulting ratepublic double[] getState()
getState in interface ODE
public void draw(DrawingPanel panel,
java.awt.Graphics g)
draw in interface Drawablepanel - the drawing panelg - the graphics context
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||