Class MandelbrotSetIterationCountGenerator


  • public class MandelbrotSetIterationCountGenerator
    extends java.lang.Object
    Implements the mandelbrot set calculations.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int[][] calculate​(int xresolution, int yresolution, int numberOfThreads)
      Calculate the iteration values for a given resolution using a certain number of threads.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MandelbrotSetIterationCountGenerator

        public MandelbrotSetIterationCountGenerator​(Bound bound,
                                                    int maximumIterations,
                                                    double escapeRadius)
        Constructor for the generator.
        Parameters:
        bound - Bound representing the minimum and maximum complex number to have iteration values calculated for.
        maximumIterations - Maximum number of iterations before assuming the complex number lies within the mandelbrot set.
        escapeRadius - The escape radius to use when calculating the iteration values.
    • Method Detail

      • calculate

        public int[][] calculate​(int xresolution,
                                 int yresolution,
                                 int numberOfThreads)
        Calculate the iteration values for a given resolution using a certain number of threads.
        Parameters:
        xresolution - The resolution of the x-axis.
        yresolution - The resolution of the y-axis.
        numberOfThreads - The number of threads to run the calculation on.
        Returns:
        A 2D array containing the iteration values. Each position in the array can be accessed as so: array[x][y].