org.opensourcephysics.sip.ch09
Class OscillatorsMode

java.lang.Object
  extended by org.opensourcephysics.sip.ch09.OscillatorsMode
All Implemented Interfaces:
Drawable, Function

public class OscillatorsMode
extends java.lang.Object
implements Drawable, Function

OscillatorsMode models a chain of oscillators in a single mode.


Method Summary
 void draw(DrawingPanel panel, java.awt.Graphics g)
          Draws the normal mode's initial condtion
 double evaluate(double x)
          Evaluates the displacement for an oscillator at postion x
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

evaluate

public double evaluate(double x)
Evaluates the displacement for an oscillator at postion x

Specified by:
evaluate in interface Function
Parameters:
x - postion along chain
Returns:
the displacement

draw

public void draw(DrawingPanel panel,
                 java.awt.Graphics g)
Draws the normal mode's initial condtion

Specified by:
draw in interface Drawable
Parameters:
panel - DrawingPanel
g - Graphics