|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.cabrillo.tracker.TTrack
org.opensourcephysics.cabrillo.tracker.PointMass
org.opensourcephysics.cabrillo.tracker.ParticleModel
org.opensourcephysics.cabrillo.tracker.DynamicParticle
org.opensourcephysics.cabrillo.tracker.DynamicParticleConvertible
public class DynamicParticleConvertible
DynamicParticle models a particle using Newton'w 2nd law.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrack |
|---|
TTrack.StepArray |
| Field Summary | |
|---|---|
static java.lang.String |
OMEGA
|
static java.lang.String |
THETA
|
| Fields inherited from class org.opensourcephysics.cabrillo.tracker.DynamicParticle |
|---|
frameStates, initialState, iterationsPerStep, points, system |
| Fields inherited from class org.opensourcephysics.cabrillo.tracker.ParticleModel |
|---|
dt, endFrame, functionEditor, functionPanel, inspector, inspectorH, inspectorX, inspectorY, invalidWarningShown, lastValidFrame, loading, nan, prevX, prevY, refreshDerivsLater, refreshing, refreshStepsLater, showInspector, startFrame, startFrameUndefined, t0, time, timeFormat, tracePt, tracePtsPerStep, traceX, traceY, xLimit, yLimit |
| Fields inherited from class org.opensourcephysics.cabrillo.tracker.PointMass |
|---|
aAtOrigin, accelerationMenu, accelFootprintMenu, aDeriv, aDerivSpill, aFootprint, aFootprints, aMap, aTailsToOriginItem, aTailsToPositionItem, autotrackItem, aVisibleItem, aVisibleOnAll, aVisMap, dataDescriptions, derivData, mass, massField, massLabel, mSeparator, params, positionFootprintMenu, trace, traceStroke, traceVisible, validData, vAtOrigin, vDeriv, vDerivSpill, velocFootprintMenu, velocityMenu, vFootprint, vFootprints, vMap, vTailsToOriginItem, vTailsToPositionItem, vVisibleItem, vVisibleOnAll, vVisMap, xData, xVisibleOnAll, xVisMap, yData |
| Constructor Summary | |
|---|---|
DynamicParticleConvertible()
|
|
| Method Summary | |
|---|---|
protected UserFunction[] |
createPolarMainFunctions()
|
protected double[] |
getCartesianState(double[] polarState)
Converts a polar state {t, r, theta, vr, omega} to cartesian {t, x, y, vx, vy}, both relative to the origin. |
static XML.ObjectLoader |
getLoader()
Returns an ObjectLoader to save and load data for this class. |
protected java.awt.geom.Point2D[] |
getNextTracePositions()
Gets the next trace position. |
protected double[] |
getPolarState(double[] state)
Converts a cartesian state {t, x, y, vx, vy} to polar {t, r, theta, vr, omega}, both relative to the origin. |
void |
getRate(double[] state,
double[] rate)
Gets the rate {vx, ax, vy, ay, 1} based on a specified state {x, vx, y, vy, t}. |
double[] |
getState()
Gets the current state {x, vx, y, vy, t}. |
protected void |
initializeFunctionPanel()
Creates the ModelFunctionPanel. |
protected void |
initializeParameters(double[] input)
Creates the initial position and velocity parameters by converting from cartesian to polar or vice-versa. |
void |
reset()
Resets parameters, initializes solver and sets position(s) for start frame or first clip frame following. |
protected void |
resetState(double[] input)
Resets the state variables based on the specified input. |
void |
setSolver(java.lang.Class<?> solverClass)
Sets the ODESolver type. |
| Methods inherited from class org.opensourcephysics.cabrillo.tracker.DynamicParticle |
|---|
delete, draw, getDisplayName, getEndFrame, getInitialState, getStartFrame, getXYForces, initializeInitEditor, refreshSteps, resetState, restoreState, saveState, setEndFrame, setStartFrame, setTracePositions |
| Methods inherited from class org.opensourcephysics.cabrillo.tracker.ParticleModel |
|---|
cleanup, createMassAndTimeParameters, drawMe, findInteractive, getFunctionEditor, getInitEditor, getInitialValues, getInspector, getMass, getMenu, getModels, getParamEditor, getToolbarPointComponents, isAutoTrackable, isDependent, isModelsVisible, isStepComplete, propertyChange, refreshDerivsIfNeeded, refreshInitialTime, setAnglesInRadians, setLocked, setMass, setName, setTrackerPanel, trimSteps |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String THETA
public static final java.lang.String OMEGA
| Constructor Detail |
|---|
public DynamicParticleConvertible()
| Method Detail |
|---|
public void reset()
DynamicParticle
reset in class DynamicParticlepublic double[] getState()
DynamicParticle
getState in interface ODEgetState in class DynamicParticle
public void getRate(double[] state,
double[] rate)
DynamicParticle
getRate in interface ODEgetRate in class DynamicParticlestate - the staterate - the rate of change of the statepublic void setSolver(java.lang.Class<?> solverClass)
setSolver in class DynamicParticlesolverClass - the solver classprotected void initializeFunctionPanel()
initializeFunctionPanel in class DynamicParticleprotected UserFunction[] createPolarMainFunctions()
protected java.awt.geom.Point2D[] getNextTracePositions()
getNextTracePositions in class DynamicParticleprotected void resetState(double[] input)
input - double[] {t, x, y, vx, vy} or {t, r, theta, vr, omega}protected void initializeParameters(double[] input)
input - double[] {t, x, y, vx, vy} or {t, r, theta, vr, omega}protected double[] getPolarState(double[] state)
state - the cartesian state
protected double[] getCartesianState(double[] polarState)
polarState - the polar state
public static XML.ObjectLoader getLoader()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||