Class MandelbrotAlgorithm

  • All Implemented Interfaces:
    IFractalAlgorithm

    public class MandelbrotAlgorithm
    extends java.lang.Object
    implements IFractalAlgorithm
    Algorithm for calculating the mandelbrot set.
    • Constructor Detail

      • MandelbrotAlgorithm

        public MandelbrotAlgorithm()
    • Method Detail

      • determineColor

        public short determineColor​(double xn,
                                    double yn,
                                    short max)
        Determine the color of a point.
        Specified by:
        determineColor in interface IFractalAlgorithm
        Parameters:
        x - The x coordinate.
        y - The y coordinate.
        max - The maximum depth.
        Returns:
        A value for the point from 0 to max.
      • toString

        public java.lang.String toString()
        Get a string representation.
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Test if two objects are equal.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Get the hash code.
        Overrides:
        hashCode in class java.lang.Object