org.opensourcephysics.sip.ch18
Class ContractedRing

java.lang.Object
  extended by org.opensourcephysics.sip.ch18.ContractedRing
All Implemented Interfaces:
Drawable
Direct Known Subclasses:
ObservedRing

public class ContractedRing
extends java.lang.Object
implements Drawable

ContractedRing models the Lorentz-Fitzgerald contraction of a ring moving in the x direction.


Constructor Summary
ContractedRing(double x0, double y0, double vx, int numberOfPoints)
          ContractedRing models the shape of a ring at relativistic speeds.
 
Method Summary
 void draw(DrawingPanel panel, java.awt.Graphics g)
          Draws the contracted circle.
 void setTime(double t)
          Sets the time and translates the shape to its position at the given time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContractedRing

public ContractedRing(double x0,
                      double y0,
                      double vx,
                      int numberOfPoints)
ContractedRing models the shape of a ring at relativistic speeds.

Parameters:
x0 - double initial center x coordinate
y0 - double initial center y coordinate
vx - double x velocity
numPts - int number of points for rendering
Method Detail

setTime

public void setTime(double t)
Sets the time and translates the shape to its position at the given time.

Parameters:
t - double the time

draw

public void draw(DrawingPanel panel,
                 java.awt.Graphics g)
Draws the contracted circle.

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