org.opensourcephysics.sip.ch09
Class Oscillators

java.lang.Object
  extended by org.opensourcephysics.sip.ch09.Oscillators
All Implemented Interfaces:
Drawable

public class Oscillators
extends java.lang.Object
implements Drawable

Oscillators models the analytic soution of a chain of oscillators with fixed end points. Students should implement the ODE interface to complete the exercise in "An Introduction to Computer Simulation Methods."


Constructor Summary
Oscillators(int mode, int N)
          Constructs a chain of coupled oscillators in the given mode and number of oscillators.
 
Method Summary
 void draw(DrawingPanel drawingPanel, java.awt.Graphics g)
          Draws the oscillators
 void step(double dt)
          Steps the time using the given time step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Oscillators

public Oscillators(int mode,
                   int N)
Constructs a chain of coupled oscillators in the given mode and number of oscillators.

Parameters:
mode - int
N - int
Method Detail

step

public void step(double dt)
Steps the time using the given time step.

Parameters:
dt -

draw

public void draw(DrawingPanel drawingPanel,
                 java.awt.Graphics g)
Draws the oscillators

Specified by:
draw in interface Drawable
Parameters:
drawingPanel -
g -