An interactive 3D visualization tool for exploring Mandelbrot and Julia sets, built with Python, OpenGL, and PyQt5.
- 🎨 Real-time 3D visualization of fractals
- 🔄 Interactive rotation and zoom capabilities
- 🌈 Dynamic color animation
- 🔲 Support for both Mandelbrot and Julia sets
- 🎮 Intuitive GUI controls
- 🖱️ Mouse-based navigation
- ⚡ Optimized performance with OpenGL
python 3.7+
PyQt5
PyOpenGL
numpy
- Clone the repository:
git clone https://github.com/melihcanndemir/3d-fractal-explorer.git
cd 3d-fractal-explorer
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python fractal_explorer.pyw
Fractals are complex geometric patterns that repeat infinitely at different scales. They're created by repeating a simple mathematical process over and over.
The Mandelbrot set is defined by the function:
z₍ₙ₊₁₎ = zₙ² + c
where z₀ = 0 and c is a complex number. A point c is in the Mandelbrot set if the sequence remains bounded.
Julia sets use the same function as the Mandelbrot set:
z₍ₙ₊₁₎ = zₙ² + c
but here, c is fixed and z₀ varies. Each different value of c creates a different Julia set.
-
Basic Navigation:
- 🖱️ Left-click and drag to move around
- 🖲️ Mouse wheel to zoom in/out
- 🔄 Watch the automatic rotation
-
Controls:
- Switch between Mandelbrot and Julia sets
- Adjust iteration count for detail
- Modify Julia set parameters
- Control color animation speed
The project demonstrates several advanced programming concepts:
- 3D Graphics Programming with OpenGL
- Complex Number Mathematics
- Real-time Animation
- Event-driven Programming
- GUI Development with Qt
- Performance Optimization
# Example of the core fractal calculation
def calculate_fractal(z, c, max_iter):
n = 0
while abs(z) <= 2 and n < max_iter:
z = z*z + c
n += 1
return n
Contributions are welcome! Here are ways you can contribute:
- 🐛 Report bugs
- ✨ Propose new features
- 📝 Improve documentation
- 🔍 Submit pull requests
To learn more about the concepts used in this project:
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to Benoit B. Mandelbrot for his groundbreaking work on fractals
- PyQt and OpenGL communities for their excellent documentation
- All contributors and users of this project
Made with ❤️ by Melih Can Demir
"The beauty of fractals shows that simple rules can create infinite complexity."