|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfpp.fractal.DoublePrecisionFractalGenerator
infpp.fractal.ThreadedDoublePrecisionFractalGenerator
public abstract class ThreadedDoublePrecisionFractalGenerator
The Threaded DoublePrecisionFractalGenerator class provides an abstract class that serves as a common base for FractalGenerators using double precision floating point arithmetic and multiple threads to speed up the calculation.
Constructor Summary | |
---|---|
protected |
ThreadedDoublePrecisionFractalGenerator()
Constructs a new ThreadedDoublePrecisionFractalGenerator and initializes the buffers. |
Method Summary | |
---|---|
protected abstract int |
calculateNumberOfIterationsAtComplex(Complex c)
Performs the actual calculation of the number of required iterations to determine divergence of a certain sequence defined using the specified complex number. |
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 as it is stored in one of the buffers used by this ThreadedDoublePrecisionFractalGenerator. |
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. |
protected void |
startWorking()
Begins the process of filling the buffers with data. |
Methods inherited from class infpp.fractal.DoublePrecisionFractalGenerator |
---|
calculateComplexFromScreenCoordinates, getComplexOrigin, getRealDimension, getScreenHeight, getScreenWidth |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ThreadedDoublePrecisionFractalGenerator()
Method Detail |
---|
public void setComplexOrigin(Complex complexOrigin)
FractalGenerator
setComplexOrigin
in interface FractalGenerator
setComplexOrigin
in class DoublePrecisionFractalGenerator
complexOrigin
- the point on the complex plane about which to
center the visible partFractalGenerator.setComplexOrigin(Complex)
public void setRealDimension(double realDimension)
FractalGenerator
setRealDimension
in interface FractalGenerator
setRealDimension
in class DoublePrecisionFractalGenerator
realDimension
- the specified diameterFractalGenerator.setRealDimension(double)
public void setScreenDimension(int width, int height)
FractalGenerator
setScreenDimension
in interface FractalGenerator
setScreenDimension
in class DoublePrecisionFractalGenerator
width
- the width of the area to be displayed in pixelsheight
- the height of the area to be displayed in pixelsFractalGenerator.setScreenDimension(int, int)
public int getNumberOfIterationsAtPixel(int x, int y)
x
- the x coordinate of the specified pixely
- the y coordinate of the specified pixel
FractalGenerator.getNumberOfIterationsAtPixel(int, int)
protected abstract int calculateNumberOfIterationsAtComplex(Complex c)
c
- the specified complex number
FractalGenerator.getNumberOfIterationsAtPixel(int, int)
protected void startWorking()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |