|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.sip.ch05.ThreeBody
public class ThreeBody
ThreeBody models the gravitational three-body problem.
| Constructor Summary | |
|---|---|
ThreeBody()
|
|
| Method Summary | |
|---|---|
void |
doStep()
Steps the time using an ode solver. |
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the three bodies. |
void |
getRate(double[] state,
double[] rate)
Gets the rate using the given state. |
double[] |
getState()
Gets the state: x1, vx1, y1, vy1, x2, vx2, y2, vy2, x3, vx3, y3, vy3, t. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreeBody()
| Method Detail |
|---|
public void draw(DrawingPanel panel,
java.awt.Graphics g)
draw in interface Drawablepanel - g - public void doStep()
public void getRate(double[] state,
double[] rate)
getRate in interface ODEstate - double[]rate - double[]public double[] getState()
getState in interface ODE
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||