Class Fractal
java.lang.Object
Fractal
- Direct Known Subclasses:
- Buddhabrot, Mandelbrot
public class Fractal
- extends java.lang.Object
Constructor Summary |
Fractal(java.lang.String xC,
java.lang.String yC,
java.lang.String delta,
java.lang.String bailout,
Palette palette,
java.lang.String filename)
Constructor: setting the screen size. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xCenter
protected double xCenter
yCenter
protected double yCenter
delta
protected double delta
bailout
protected int bailout
iterations
protected int iterations
paletteName
protected java.lang.String paletteName
palette
protected Palette palette
filename
protected java.lang.String filename
dimension
protected int dimension
centreX
protected double centreX
centreY
protected double centreY
leftBound
protected double leftBound
rightBound
protected double rightBound
topBound
protected double topBound
bottomBound
protected double bottomBound
xMin
protected double xMin
xMax
protected double xMax
yMin
protected double yMin
yMax
protected double yMax
domain
protected double domain
range
protected double range
MAX_ITERATE
protected int MAX_ITERATE
iteration
protected int iteration
TARGET
protected double[] TARGET
point
protected ComplexNumber point
invert
protected boolean invert
Fractal
public Fractal(java.lang.String xC,
java.lang.String yC,
java.lang.String delta,
java.lang.String bailout,
Palette palette,
java.lang.String filename)
- Constructor: setting the screen size.
getDimension
public int getDimension()
- Returns:
- the dimension
setDimension
public void setDimension(int dimension)
- Parameters:
dimension
- the dimension to set
setEscapeTime
protected int setEscapeTime(ComplexNumber c)
draw
protected void draw(java.awt.Graphics g)
- Expected to be overriden in subclasses...
- Parameters:
g
- Graphics reference to the BufferedImage to be drawn on
isPartOfSet
protected boolean isPartOfSet()
- Identifying whether that point is part of the Set.
- Returns:
- true if it is part of the set, false otherwise
mapColumnToReal
protected double mapColumnToReal(int col)
mapRowToImaginary
protected double mapRowToImaginary(int row)
mapRealToColumn
protected int mapRealToColumn(double x)
mapImaginaryToRow
protected int mapImaginaryToRow(double y)
zoom
public void zoom(int col,
int row,
double factor)
iteration
public int iteration()
- Return the number of iterations done before the point hits the limit.
- Returns:
- the number of iterations
getMaxIterations
public int getMaxIterations()
getFilename
public java.lang.String getFilename()
- Returns:
- the filename