Class Fractal

java.lang.Object
  extended by Fractal
Direct Known Subclasses:
Buddhabrot, Mandelbrot

public class Fractal
extends java.lang.Object


Field Summary
protected  int bailout
           
protected  double bottomBound
           
protected  double centreX
           
protected  double centreY
           
protected  double delta
           
protected  int dimension
           
protected  double domain
           
protected  java.lang.String filename
           
protected  boolean invert
           
protected  int iteration
           
protected  int iterations
           
protected  double leftBound
           
protected  int MAX_ITERATE
           
protected  Palette palette
           
protected  java.lang.String paletteName
           
protected  ComplexNumber point
           
protected  double range
           
protected  double rightBound
           
protected  double[] TARGET
           
protected  double topBound
           
protected  double xCenter
           
protected  double xMax
           
protected  double xMin
           
protected  double yCenter
           
protected  double yMax
           
protected  double yMin
           
 
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.
 
Method Summary
protected  void draw(java.awt.Graphics g)
          Expected to be overriden in subclasses...
 int getDimension()
           
 java.lang.String getFilename()
           
 int getMaxIterations()
           
protected  boolean isPartOfSet()
          Identifying whether that point is part of the Set.
 int iteration()
          Return the number of iterations done before the point hits the limit.
protected  double mapColumnToReal(int col)
           
protected  int mapImaginaryToRow(double y)
           
protected  int mapRealToColumn(double x)
           
protected  double mapRowToImaginary(int row)
           
 void setDimension(int dimension)
           
protected  int setEscapeTime(ComplexNumber c)
           
 void zoom(int col, int row, double factor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

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.

Method Detail

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