|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensourcephysics.sip.ch10.FieldLine
public class FieldLine
FieldLine computes a electric field line in the vicinity of one or more point charges.
Constructor Summary | |
---|---|
FieldLine(DrawingFrame frame,
double x0,
double y0,
double stepSize)
Constructs a FieldLine for use in the given drawing frame. |
Method Summary | |
---|---|
void |
draw(DrawingPanel panel,
java.awt.Graphics g)
Draws the field line. |
void |
getRate(double[] state,
double[] rate)
Gets the rate for the field line using the given state. |
double[] |
getState()
Gets the state vector of the field line. |
void |
run()
Runs the field line calculation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FieldLine(DrawingFrame frame, double x0, double y0, double stepSize)
frame
- x0
- y0
- stepSize
- Method Detail |
---|
public double[] getState()
getState
in interface ODE
public void getRate(double[] state, double[] rate)
getRate
in interface ODE
state
- the given staterate
- the ratepublic void run()
run
in interface java.lang.Runnable
public void draw(DrawingPanel panel, java.awt.Graphics g)
draw
in interface Drawable
panel
- g
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |