infpp.fractal
Class GrayScaleColorizer

java.lang.Object
  extended by infpp.fractal.GrayScaleColorizer
All Implemented Interfaces:
Colorizer

public final class GrayScaleColorizer
extends java.lang.Object
implements Colorizer

The GrayScaleColorizer class provides a Colorizer that generates different shades of gray.

Author:
both

Constructor Summary
GrayScaleColorizer(int maxIterations)
          Constructs a new GrayScaleColorizer.
 
Method Summary
 java.awt.Color calculateColor(int numberOfIterations)
          Calculates a shade of gray from the given number of required iterations at a point in a fractal and the maximum number of iterations given to the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrayScaleColorizer

public GrayScaleColorizer(int maxIterations)
Constructs a new GrayScaleColorizer.

Parameters:
maxIterations - the maximum number of iterations of the associated fractal generator
Method Detail

calculateColor

public java.awt.Color calculateColor(int numberOfIterations)
Calculates a shade of gray from the given number of required iterations at a point in a fractal and the maximum number of iterations given to the constructor.

Specified by:
calculateColor in interface Colorizer
Parameters:
numberOfIterations - the given number of required iterations
Returns:
the calculated Color
See Also:
Colorizer.calculateColor(int)