Class OrbitParticle

java.lang.Object
  extended by Particle
      extended by OrbitParticle

public class OrbitParticle
extends Particle

This particle Orbits around the location provided in the constructor.

Author:
Tim

Constructor Summary
OrbitParticle(double hue, double startX, double startY, double xCenter, double yCenter)
          Constructor that lets you determine color, start position, and center of the window.
 
Method Summary
 void takeOneStep()
          Move this Particle one frame's worth of movement.
 
Methods inherited from class Particle
drawSelf, getColor, getTimesMoved, getXPosition, getXVelocity, getYPosition, getYVelocity, setXPosition, setXVelocity, setYPosition, setYVelocity
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrbitParticle

public OrbitParticle(double hue,
                     double startX,
                     double startY,
                     double xCenter,
                     double yCenter)
Constructor that lets you determine color, start position, and center of the window.

Parameters:
hue - A number from 0 to 1 that specifies desired hue of the Particle
startX - The starting x coordinate
startY - The starting y coordinate
xCenter - The x coordinate of where we are attracted
yCenter - The y coordinate of where we are attracted
Method Detail

takeOneStep

public void takeOneStep()
Move this Particle one frame's worth of movement. It uses some geometric math to give it "gravity" towards the center.

Overrides:
takeOneStep in class Particle