Class TwoDeeWalk

java.lang.Object
  |
  +--MathSystem
        |
        +--TwoDeeWalk

public class TwoDeeWalk
extends MathSystem

Two-Dimensional Rotor-Walk System


Field Summary
static int MAX_SIZE
          Maximum size I want this system to get to.
 int n
          Current Iteration Number
 int subit
          Current Subiteration Number
 
Constructor Summary
TwoDeeWalk()
          The Constructor
 
Method Summary
 int animateNum()
          Returns number of intermediate steps in the animation.
 void draw(int sizeX, int sizeY, Graphics gb)
          draw() Draws itself on the graphics buffer.
 void drawAnimate(int sizeX, int sizeY, Graphics gb, int animate)
          Draws the Nth intermediate animation.
 String getInfo()
          Returns a long string describing some info about current state.
 void iterate(int number)
          iterate the system.
 void printArray()
          print the current system out to System.out.
 void reset()
          Restarts the system
 void subiterate(int subits)
          Does a subiteration, if applicable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_SIZE

public static int MAX_SIZE
Maximum size I want this system to get to.

n

public int n
Current Iteration Number

subit

public int subit
Current Subiteration Number
Constructor Detail

TwoDeeWalk

public TwoDeeWalk()
The Constructor
Method Detail

reset

public void reset()
Restarts the system
Overrides:
reset in class MathSystem

iterate

public void iterate(int number)
iterate the system.
Overrides:
iterate in class MathSystem
Parameters:
number - how many times to iterate. usually 1.

subiterate

public void subiterate(int subits)
Does a subiteration, if applicable.
Overrides:
subiterate in class MathSystem
Following copied from class: MathSystem
Parameters:
subiterations - is the number of subiterations. Usually 1.

printArray

public void printArray()
print the current system out to System.out.
See Also:
System.out

draw

public void draw(int sizeX,
                 int sizeY,
                 Graphics gb)
draw() Draws itself on the graphics buffer.
Overrides:
draw in class MathSystem
Parameters:
sizeX - is the x size of region on which to draw.
sizeY - is the y size of region on which to draw.

getInfo

public String getInfo()
Description copied from class: MathSystem
Returns a long string describing some info about current state. Override if you want such a function.
Overrides:
getInfo in class MathSystem

animateNum

public int animateNum()
Returns number of intermediate steps in the animation. Notes: Should return (number of pixels in a tile)/2. Then the animation will go faster later on.
Overrides:
animateNum in class MathSystem

drawAnimate

public void drawAnimate(int sizeX,
                        int sizeY,
                        Graphics gb,
                        int animate)
Draws the Nth intermediate animation. 1 <= aniamte <= animateNum(). Notes: Don't repeat code. if animate==1, call into draw(), then draw OVER the active region. Else, just redraw the active region. Assume that the graphics is attached to an image that is not erased between takes. for (int animate = 1; animate <= animateNum(); animate++)
Overrides:
drawAnimate in class MathSystem