Skip to content

LRFLEW/Mandelbrot

Repository files navigation

Mandelbrot

A java program that renders the Mandelbrot Set. I made this a few years ago over the course of about a week. I made this to experiment with the method of calculating it and how it might be multithreaded. The main method for the project is in Mandelbrot.java.

Usage

When you run the program, two windows will open. The Mandelbrot Set window is the display for the project, and can be resized. The Settings window controls the contents of the other window. It has two tabs: the Colors tab and the Advanced tab.

The Colors tap starts with a preview of the gradient used for the set. Below it, the arrows allows you to change which color anchor is selected. The selected node is indicated on the gradient by a vertical line. Below it are the two add buttons, which add a new node to the left or right of the selected node respectively. The Delete button removes the selected node, and the In Set button changes the selection to the color used when the position is in the set. Below the buttons is a number selector and slider that both allow you to adjust where in the gradient the node is. Below that is a color preview and number and slider inputs for the red, green, and blue components of the color. Finally, the Redraw button causes the view to update using the new gradient information. Redrawing uses cached computation information, so it's faster than completely recalculating.

The Advanced tab allows you to adjust details of how the set is drawn. At the top is a selector for the different antialiasing modes. "No Antialiasing" provides no antialiasing, "Supersampling Antialiasing" samples multiple points within the pixel on a grid. "Selective Supersampling" uses a multi-pass rendering technique where it first calculates the image without any antialiasing, and then recalculates any pixels that are not in the set or have a neighbor that's not in the set using the supersampling technique. Next, there are two number inputs that allow you to specify the size of the grid used in the supersampling (so the total number of samples taken is the product of the two numbers). Below that is a number selector that allows you to specify the max iteration depth of the computation. Below that, there's a number selector for the zoom level, and two number selectors and sliders for specifying the location to zoom in on. Finally, the Recalc button will recalculate the set using the new parameters.

About

A java program that renders the Mandelbrot Set

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages