org.opensourcephysics.sip.ch06
Class PoincareApp

java.lang.Object
  extended by org.opensourcephysics.controls.AbstractAnimation
      extended by org.opensourcephysics.controls.AbstractSimulation
          extended by org.opensourcephysics.sip.ch06.PoincareApp
All Implemented Interfaces:
java.lang.Runnable, Animation, Simulation

public class PoincareApp
extends AbstractSimulation

PoincareApp plots a phase diagram and a Poincare map for the damped, driven pendulum.


Field Summary
 
Fields inherited from class org.opensourcephysics.controls.AbstractSimulation
control, showStepsPerDisplay, stepCounter, stepsPerDisplay
 
Fields inherited from class org.opensourcephysics.controls.AbstractAnimation
animationThread, decimalFormat, delayTime, mainFrame
 
Constructor Summary
PoincareApp()
          Constructs a PoincareApp.
 
Method Summary
 void clear()
          Clears the plots.
 void doStep()
          Does a step by advancing the time by PI.
 void initialize()
          Initializes the animation and clears the plots.
static void main(java.lang.String[] args)
          Starts the Java application.
 void reset()
          Resets all parameters to their defaults.
 
Methods inherited from class org.opensourcephysics.controls.AbstractSimulation
enableStepsPerDisplay, getControl, getLoader, getStepCounter, getStepsPerDisplay, initializeAnimation, resetAnimation, run, setControl, setStepsPerDisplay, start, startAnimation, startRunning, startSimulation, stepAnimation, stop, stopAnimation, stopRunning, stopSimulation
 
Methods inherited from class org.opensourcephysics.controls.AbstractAnimation
addChildFrame, clearChildFrames, getChildFrames, getDelayTime, getMainFrame, getOSPApp, isRunning, setDelayTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensourcephysics.controls.Simulation
isRunning
 

Constructor Detail

PoincareApp

public PoincareApp()
Constructs a PoincareApp.

Method Detail

reset

public void reset()
Resets all parameters to their defaults.

Overrides:
reset in class AbstractSimulation

doStep

public void doStep()
Does a step by advancing the time by PI. Multiple data points are added to the phase space plot in a single step in order to produce a smooth curve. Because the angular frequency of the external force equals two, a single data point is added to the Poincare map at the end of the step.

Specified by:
doStep in class AbstractAnimation

initialize

public void initialize()
Initializes the animation and clears the plots.

Overrides:
initialize in class AbstractSimulation

clear

public void clear()
Clears the plots.


main

public static void main(java.lang.String[] args)
Starts the Java application.

Parameters:
args - command line parameters