infpp.fractal
Class DoublePrecisionFractalGenerator

java.lang.Object
  extended by infpp.fractal.DoublePrecisionFractalGenerator
All Implemented Interfaces:
FractalGenerator
Direct Known Subclasses:
SimpleDoublePrecisionJuliaGenerator, SimpleDoublePrecisionMandelbrotGenerator, ThreadedDoublePrecisionFractalGenerator

public abstract class DoublePrecisionFractalGenerator
extends java.lang.Object
implements FractalGenerator

The DoublePrecisionFractalGenerator class provides an abstract class that serves as a common base for FractalGenerators using double precision floating point arithmetic.

Author:
both

Constructor Summary
DoublePrecisionFractalGenerator()
           
 
Method Summary
 Complex calculateComplexFromScreenCoordinates(int x, int y)
          Calculates the point on the complex plane that corresponds to the given pixel.
 Complex getComplexOrigin()
          Gets the complex point located at the center of the visible area of the fractal.
 double getRealDimension()
          Gets the minimum diameter of the visible part of the fractal.
 int getScreenHeight()
          Gets the height of the area that is drawn in pixels.
 int getScreenWidth()
          Gets the width of the area that is drawn in pixels.
 void setComplexOrigin(Complex complexOrigin)
          Sets the center of the visible part of the fractal to the specified point on the complex plane.
 void setRealDimension(double realDimension)
          Sets the minimum diameter of the visible part of the fractal to the specified diameter.
 void setScreenDimension(int width, int height)
          Sets the size of the area to be displayed in pixels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface infpp.fractal.FractalGenerator
getNumberOfIterationsAtPixel
 

Constructor Detail

DoublePrecisionFractalGenerator

public DoublePrecisionFractalGenerator()
Method Detail

getComplexOrigin

public Complex getComplexOrigin()
Description copied from interface: FractalGenerator
Gets the complex point located at the center of the visible area of the fractal.

Specified by:
getComplexOrigin in interface FractalGenerator
Returns:
the complex point located at the center of the visible area of the fractal
See Also:
FractalGenerator.getComplexOrigin()

setComplexOrigin

public void setComplexOrigin(Complex complexOrigin)
Description copied from interface: FractalGenerator
Sets the center of the visible part of the fractal to the specified point on the complex plane.

Specified by:
setComplexOrigin in interface FractalGenerator
Parameters:
complexOrigin - the point on the complex plane about which to center the visible part
See Also:
FractalGenerator.setComplexOrigin(Complex)

getRealDimension

public double getRealDimension()
Description copied from interface: FractalGenerator
Gets the minimum diameter of the visible part of the fractal.

Specified by:
getRealDimension in interface FractalGenerator
Returns:
the minimum diameter of the visible part of the fractal
See Also:
FractalGenerator.getRealDimension()

setRealDimension

public void setRealDimension(double realDimension)
Description copied from interface: FractalGenerator
Sets the minimum diameter of the visible part of the fractal to the specified diameter.

Specified by:
setRealDimension in interface FractalGenerator
Parameters:
realDimension - the specified diameter
See Also:
FractalGenerator.setRealDimension(double)

getScreenWidth

public int getScreenWidth()
Description copied from interface: FractalGenerator
Gets the width of the area that is drawn in pixels.

Specified by:
getScreenWidth in interface FractalGenerator
Returns:
the width of the area that is drawn in pixels
See Also:
FractalGenerator.getScreenWidth()

getScreenHeight

public int getScreenHeight()
Description copied from interface: FractalGenerator
Gets the height of the area that is drawn in pixels.

Specified by:
getScreenHeight in interface FractalGenerator
Returns:
the height of the area that is drawn in pixels
See Also:
FractalGenerator.getScreenHeight()

setScreenDimension

public void setScreenDimension(int width,
                               int height)
Description copied from interface: FractalGenerator
Sets the size of the area to be displayed in pixels.

Specified by:
setScreenDimension in interface FractalGenerator
Parameters:
width - the width of the area to be displayed in pixels
height - the height of the area to be displayed in pixels
See Also:
FractalGenerator.setScreenDimension(int, int)

calculateComplexFromScreenCoordinates

public Complex calculateComplexFromScreenCoordinates(int x,
                                                     int y)
Description copied from interface: FractalGenerator
Calculates the point on the complex plane that corresponds to the given pixel.

Specified by:
calculateComplexFromScreenCoordinates in interface FractalGenerator
Parameters:
x - the x coordinate of the specified pixel
y - the y coordinate of the specified pixel
Returns:
the point on the complex plane that corresponds to the given pixel
See Also:
FractalGenerator.calculateComplexFromScreenCoordinates(int, int)