org.opensourcephysics.cabrillo.tracker
Class DynamicParticlePolar

java.lang.Object
  extended by org.opensourcephysics.cabrillo.tracker.TTrack
      extended by org.opensourcephysics.cabrillo.tracker.PointMass
          extended by org.opensourcephysics.cabrillo.tracker.ParticleModel
              extended by org.opensourcephysics.cabrillo.tracker.DynamicParticle
                  extended by org.opensourcephysics.cabrillo.tracker.DynamicParticlePolar
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener, Drawable, Interactive, Measurable, Trackable, ODE
Direct Known Subclasses:
DynamicSystem

public class DynamicParticlePolar
extends DynamicParticle

DynamicParticlePolar models a particle using Newton'w 2nd law in polar coordinates.

Version:
1.0
Author:
D. Brown

Nested Class Summary
 
Nested classes/interfaces inherited from class org.opensourcephysics.cabrillo.tracker.TTrack
TTrack.StepArray
 
Field Summary
 
Fields inherited from class org.opensourcephysics.cabrillo.tracker.DynamicParticle
frameStates, initialState, iterationsPerStep, points, solver, state, 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
 
Fields inherited from class org.opensourcephysics.cabrillo.tracker.TTrack
alphabet, angleField, angleLabel, angleSeparator, autoAdvance, autoAdvanceItem, autoTrackerMarking, circleFootprintListener, clearStepsItem, closeButton, colorItem, constantsLoadedFromXML, data, dataBuilderItem, dataFrames, dataProp, dataValid, defaultColors, defaultFootprint, deleteItem, description, descriptionItem, enabled, fieldBorder, footprint, footprintListener, footprintMenu, footprints, frc, hint, isMarking, keyFrames, labelFont, locked, lockedItem, magField, magLabel, magSeparator, markByDefault, markByDefaultItem, menu, name, nameAction, nameDialog, nameField, nameItem, panels, partName, point, preferredColumnOrder, properties, refreshDataLater, skippedStepWarningCheckbox, skippedStepWarningDialog, skippedStepWarningOn, skippedStepWarningTextpane, stepLabel, steps, stepSeparator, stepSizeWhenFirstMarked, stepValueLabel, support, targetIndex, tField, tLabel, toolbarPointComponents, toolbarTrackComponents, trackerPanel, trailLength, trailVisible, trailVisibleItem, tSeparator, tValueLabel, viewable, visible, visibleItem, worldBounds, xField, xLabel, xSeparator, xSpinner, yField, yLabel, ySeparator, ySpinner
 
Constructor Summary
DynamicParticlePolar()
           
 
Method Summary
 double[] getInitialState()
          Gets the initial state {x, vx, y, vy, t}.
static XML.ObjectLoader getLoader()
          Returns an ObjectLoader to save and load data for this class.
protected  double[] getPolarState(double[] state)
          Converts a cartesian state {x, vx, y, vy, t} to polar {r, vr, theta, omega, t}, both relative to the origin.
protected  double[] getXYForces(double[] cartesianState)
          Gets the x- and y-forces based on a specified cartesian state {x, vx, y, vy, t}.
protected  void initializeFunctionPanel()
          Creates and initializes the ModelFunctionPanel.
protected  void initializeInitEditor()
          Creates the initial position and velocity parameters.
 
Methods inherited from class org.opensourcephysics.cabrillo.tracker.DynamicParticle
delete, draw, getDisplayName, getEndFrame, getNextTracePositions, getRate, getStartFrame, getState, refreshSteps, reset, resetState, restoreState, saveState, setEndFrame, setSolver, 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 org.opensourcephysics.cabrillo.tracker.PointMass
createGUI, createStep, deleteStep, erase, erase, getAArray, getAcceleration, getAccelerationFootprint, getAccelerationFootprints, getAccelerations, getDataDescription, getDefaultAutoTrackerIndex, getFootprint, getFootprintLength, getFootprints, getNextVisibleStep, getPreviousVisibleStep, getRotationData, getRotationData, getStep, getStepLength, getTargetDescription, getToolbarTrackComponents, getVArray, getVelocities, getVelocity, getVelocityFootprint, getVelocityFootprints, getWorldAcceleration, getWorldPosition, getWorldVelocity, isAcceleration, isAVisible, isLabelsVisible, isPosition, isPositionVisible, isStepVisible, isTraceVisible, isVelocity, isVVisible, refreshData, remark, remark, setAccelerationFootprint, setAccelerationFootprints, setAVisible, setAVisibleOnAll, setColor, setFootprint, setLabelsVisible, setPositionVisible, setPositionVisibleOnAll, setTraceVisible, setVelocityFootprint, setVelocityFootprints, setVVisible, setVVisibleOnAll, updateDerivatives, updateDerivatives, updateDerivatives, updateDerivatives, updateDerivatives, updateDerivatives
 
Methods inherited from class org.opensourcephysics.cabrillo.tracker.TTrack
addFootprint, addPropertyChangeListener, addPropertyChangeListener, autoMarkAt, createWarningDialog, firePropertyChange, getColor, getData, getDataName, getDescription, getFootprint, getFootprints, getFrameForData, getMarkedPoint, getMarkingCursor, getMessage, getName, getPreferredDataOrder, getProperty, getPropertyNames, getSkippedStepWarningDialog, getStep, getSteps, getStepSizeWarningDialog, getTargetIndex, getTrailLength, getWorldBounds, getX, getXMax, getXMax, getXMin, getXMin, getY, getYMax, getYMax, getYMin, getYMin, isAutoAdvance, isAutoTrackable, isEmpty, isEnabled, isLocked, isMarkByDefault, isMeasured, isTrailVisible, isViewable, isVisible, refreshData, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, setAutoAdvance, setColorToDefault, setDefaultNameAndColor, setDescription, setEnabled, setFootprint, setFootprints, setFootprints, setMarkByDefault, setMarking, setProperty, setTargetIndex, setTargetIndex, setTargetIndex, setTrailLength, setTrailVisible, setViewable, setVisible, setX, setXY, setY, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DynamicParticlePolar

public DynamicParticlePolar()
Method Detail

getInitialState

public double[] getInitialState()
Gets the initial state {x, vx, y, vy, t}.

Overrides:
getInitialState in class DynamicParticle
Returns:
the initial state

getXYForces

protected double[] getXYForces(double[] cartesianState)
Gets the x- and y-forces based on a specified cartesian state {x, vx, y, vy, t}.

Overrides:
getXYForces in class DynamicParticle
Parameters:
cartesianState - the state
Returns:
the forces

initializeFunctionPanel

protected void initializeFunctionPanel()
Creates and initializes the ModelFunctionPanel.

Overrides:
initializeFunctionPanel in class DynamicParticle

initializeInitEditor

protected void initializeInitEditor()
Creates the initial position and velocity parameters.

Overrides:
initializeInitEditor in class DynamicParticle

getPolarState

protected double[] getPolarState(double[] state)
Converts a cartesian state {x, vx, y, vy, t} to polar {r, vr, theta, omega, t}, both relative to the origin.

Parameters:
state - the cartesian state
Returns:
the polar state

getLoader

public static XML.ObjectLoader getLoader()
Returns an ObjectLoader to save and load data for this class.

Returns:
the object loader