infpp.fractal
Interface FractalGenerator

All Known Subinterfaces:
JuliaFractalGenerator
All Known Implementing Classes:
DoublePrecisionFractalGenerator, SimpleDoublePrecisionJuliaGenerator, SimpleDoublePrecisionMandelbrotGenerator, ThreadedDoublePrecisionFractalGenerator, ThreadedDoublePrecisionJuliaGenerator, ThreadedDoublePrecisionMandelbrotGenerator

public interface FractalGenerator

The FractalGenerator interface provides a means of controlling the operation of a fractal generator.

Author:
both

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.
 int getNumberOfIterationsAtPixel(int x, int y)
          Returns the number of required iterations to determine divergence of a certain sequence at the specified pixel converted to a complex number.
 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.
 

Method Detail

getComplexOrigin

Complex getComplexOrigin()
Gets the complex point located at the center of the visible area of the fractal.

Returns:
the complex point located at the center of the visible area of the fractal

setComplexOrigin

void setComplexOrigin(Complex complexOrigin)
Sets the center of the visible part of the fractal to the specified point on the complex plane.

Parameters:
complexOrigin - the point on the complex plane about which to center the visible part

getRealDimension

double getRealDimension()
Gets the minimum diameter of the visible part of the fractal.

Returns:
the minimum diameter of the visible part of the fractal

setRealDimension

void setRealDimension(double realDimension)
Sets the minimum diameter of the visible part of the fractal to the specified diameter.

Parameters:
realDimension - the specified diameter

getScreenWidth

int getScreenWidth()
Gets the width of the area that is drawn in pixels.

Returns:
the width of the area that is drawn in pixels

getScreenHeight

int getScreenHeight()
Gets the height of the area that is drawn in pixels.

Returns:
the height of the area that is drawn in pixels

setScreenDimension

void setScreenDimension(int width,
                        int height)
Sets the size of the area to be displayed in pixels.

Parameters:
width - the width of the area to be displayed in pixels
height - the height of the area to be displayed in pixels

getNumberOfIterationsAtPixel

int getNumberOfIterationsAtPixel(int x,
                                 int y)
Returns the number of required iterations to determine divergence of a certain sequence at the specified pixel converted to a complex number.

Parameters:
x - the x coordinate of the specified pixel
y - the y coordinate of the specified pixel
Returns:
the number of required iterations

calculateComplexFromScreenCoordinates

Complex calculateComplexFromScreenCoordinates(int x,
                                              int y)
Calculates the point on the complex plane that corresponds to the given pixel.

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