org.opensourcephysics.sip.ch07
Class FermatApp

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

public class FermatApp
extends AbstractSimulation

Simulates use of Fermat's principle to find light path that minimizes time


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
FermatApp()
          Sets path frame properties
 
Method Summary
 void doStep()
          Makes one change in path at a time
 void initialize()
          Gets parameters and initializes medium
static void main(java.lang.String[] args)
          Starts the Java application.
 void reset()
          Resets to default values
 
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

FermatApp

public FermatApp()
Sets path frame properties

Method Detail

initialize

public void initialize()
Gets parameters and initializes medium

Overrides:
initialize in class AbstractSimulation

doStep

public void doStep()
Makes one change in path at a time

Specified by:
doStep in class AbstractAnimation

reset

public void reset()
Resets to default values

Overrides:
reset in class AbstractSimulation

main

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

Parameters:
args - command line parameters