infpp.fractal
Class SimpleDoublePrecisionJuliaGenerator

java.lang.Object
  extended by infpp.fractal.DoublePrecisionFractalGenerator
      extended by infpp.fractal.SimpleDoublePrecisionJuliaGenerator
All Implemented Interfaces:
FractalGenerator, JuliaFractalGenerator

public class SimpleDoublePrecisionJuliaGenerator
extends DoublePrecisionFractalGenerator
implements JuliaFractalGenerator

The SimpleDoublePrecisionJuliaGenerator provides an implementation for calculating the number of required iterations to determine the divergence of the sequence of points obtained by the recursion zn + 1 = (zn)2 + c where c is the point passed to the setDefiningPoint method and is constant during the calculation of the fractal and z1 is a point determined by screen coordinates. This implementation operates with standard double precision arithmetic.

Author:
both

Constructor Summary
SimpleDoublePrecisionJuliaGenerator(int maxIterations)
          Constructs a new SimpleDoublePrecisionJuliaGenerator initialized with (0, 0) as the defining point.
 
Method Summary
 Complex getDefiningPoint()
          Gets the defining point on the complex plane.
 int getNumberOfIterationsAtPixel(int x, int y)
          Calculates the number of required iterations to determine the divergence of the sequence of points obtained by the recursion zn + 1 = (zn)2 + c where c is the point passed to the setDefiningPoint method and is constant during the calculation of the fractal and z1 is a point determined by screen coordinates.
 void setDefiningPoint(Complex definingPoint)
          Sets the defining point on the complex plane to the specified defining point.
 
Methods inherited from class infpp.fractal.DoublePrecisionFractalGenerator
calculateComplexFromScreenCoordinates, getComplexOrigin, getRealDimension, getScreenHeight, getScreenWidth, setComplexOrigin, setRealDimension, setScreenDimension
 
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
calculateComplexFromScreenCoordinates, getComplexOrigin, getRealDimension, getScreenHeight, getScreenWidth, setComplexOrigin, setRealDimension, setScreenDimension
 

Constructor Detail

SimpleDoublePrecisionJuliaGenerator

public SimpleDoublePrecisionJuliaGenerator(int maxIterations)
Constructs a new SimpleDoublePrecisionJuliaGenerator initialized with (0, 0) as the defining point.

Parameters:
maxIterations - the maximum number of iterations to use
Method Detail

getDefiningPoint

public Complex getDefiningPoint()
Description copied from interface: JuliaFractalGenerator
Gets the defining point on the complex plane.

Specified by:
getDefiningPoint in interface JuliaFractalGenerator
Returns:
the defining point
See Also:
JuliaFractalGenerator.getDefiningPoint()

setDefiningPoint

public void setDefiningPoint(Complex definingPoint)
Description copied from interface: JuliaFractalGenerator
Sets the defining point on the complex plane to the specified defining point.

Specified by:
setDefiningPoint in interface JuliaFractalGenerator
Parameters:
definingPoint - the specified defining point
See Also:
JuliaFractalGenerator.setDefiningPoint(Complex)

getNumberOfIterationsAtPixel

public int getNumberOfIterationsAtPixel(int x,
                                        int y)
Calculates the number of required iterations to determine the divergence of the sequence of points obtained by the recursion zn + 1 = (zn)2 + c where c is the point passed to the setDefiningPoint method and is constant during the calculation of the fractal and z1 is a point determined by screen coordinates.

Specified by:
getNumberOfIterationsAtPixel in interface FractalGenerator
Parameters:
x - the x coordinate of the specified pixel
y - the y coordinate of the specified pixel
Returns:
the number of required iterations
See Also:
FractalGenerator.getNumberOfIterationsAtPixel(int, int)