/** * Fractal implements ChaoticFunction. * * @author Ben Garrison bdg@cc.gatech.edu * @version 1.0 */ public abstract class Fractal implements ChaoticFunction { protected int iterations; public Fractal(int iterations) { this.iterations = iterations; } /** * Returns the square of the absolute value of the vector. * * (absolute value squared is a less espensive operation than calculating * the absolute value - no square root) * @return the square of the absolute value of x+yi */ protected static double modulusSqrd(double x, double y) { return x*x + y*y; } public double getDefaultXMax() { return 2; } public double getDefaultYMax() { return 2; } public double getDefaultXMin() { return -2; } public double getDefaultYMin() { return -2; } }