This is a multi-threaded Java program that displays the Mandelbrot and Julia sets, allowing users to explore these fascinating fractals interactively. The application supports panning, zooming, and real-time adjustments of fractal parameters. It also includes controls to adjust the maximum iteration count, change color schemes, and save high-resolution images.
- Interactive Mandelbrot and Julia Sets: Switch between Mandelbrot and Julia fractals seamlessly.
- Real-Time Parameter Adjustment: Adjust Julia set parameters using intuitive sliders for immediate visual feedback.
- Click-to-Select Julia Parameters: In Mandelbrot mode, click on any point to generate the corresponding Julia set.
- Zoom and Pan: Use the mouse or keyboard to zoom in/out and navigate around the fractal.
- Color Schemes: Choose from multiple color schemes to customize the fractal's appearance.
- Iteration Control: Adjust the maximum number of iterations to change the fractal's detail level.
- Progress Bar: Monitor the rendering progress, especially useful for high iteration counts or resolutions.
- Save High-Resolution Images: Export the current view as a PNG image with customizable resolution.
- Keyboard Controls: Use keyboard shortcuts for panning and zooming.
- Java SE Development Kit (JDK) 8 or higher: Download the latest version from the Oracle website.
-
Clone or Download the Repository:
git clone https://github.com/Khosraw/Mandelbrot-Set-Viewer
-
Navigate to the Project Directory:
cd mandelbrot-julia-viewer
-
Compile the Program:
javac MandelbrotViewer.java MandelbrotViewerFrame.java MandelbrotPanel.java
-
Run the Program:
java MandelbrotViewer
Ensure all the
.java
files are in the same directory or adjust the classpath accordingly.
When the program is launched, it will display the Mandelbrot set in a window. You can use the following controls to explore the fractals:
-
Mouse Controls:
- Pan: Click and drag the mouse to move around the fractal.
- Zoom: Scroll the mouse wheel to zoom in and out.
-
Keyboard Controls:
- Pan: Use the arrow keys (
←
,→
,↑
,↓
) to pan left, right, up, and down. - Zoom: Press the
+
key to zoom in and the-
key to zoom out.
- Pan: Use the arrow keys (
-
Fractal Type:
- Switch Fractals: Use the "Fractal type" dropdown menu to switch between "mandelbrot" and "julia".
- Click-to-Select Julia Parameters: In Mandelbrot mode, click on any point to generate the corresponding Julia set.
-
Julia Set Parameters:
- Adjust Parameters: Use the "Julia c (Real)" and "Imag" sliders to adjust the real and imaginary parts of the Julia set parameter
c
. The fractal updates in real-time as you move the sliders.
- Adjust Parameters: Use the "Julia c (Real)" and "Imag" sliders to adjust the real and imaginary parts of the Julia set parameter
-
Color Scheme:
- Change Colors: Select a color scheme from the dropdown menu to change the fractal's appearance.
-
Iterations:
- Adjust Detail: Use the iterations slider to change the maximum number of iterations, affecting the level of detail in the fractal.
-
Progress Bar:
- Rendering Status: A progress bar at the bottom displays the rendering progress, especially useful when working with high iterations or resolutions.
-
Save Image:
- Export Fractal: Click the "Save" button to export the current fractal view as a PNG image.
- Set Resolution: Input the desired image width and height when prompted.
-
Reset View:
- Restore Defaults: Click the "Reset" button to restore the default view settings.
- Start in Mandelbrot Mode: Ensure "mandelbrot" is selected in the "Fractal type" dropdown.
- Select a Point: Click on an interesting point in the Mandelbrot set.
- View Corresponding Julia Set: The application switches to Julia mode, displaying the Julia set for the selected parameter.
- Adjust Parameters: Use the sliders to fine-tune the Julia set parameters and observe changes in real-time.
- Navigate to Desired View: Pan and zoom to frame the fractal as desired.
- Set Iterations: Increase the maximum iterations for more detail if needed.
- Click "Save": Click the "Save" button.
- Set Resolution: Enter the desired width and height for the image when prompted.
- Save the Image: Choose a file location and name to save the PNG image.
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.
Please ensure that your contributions align with the project's coding standards and include appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Fractal Exploration: Inspired by the beauty and complexity of fractal geometry.
- Contributors: Thanks to all contributors who have helped improve this application.
If you have any questions or need further assistance, please don't hesitate to ask!