Mandelbulb Fractal Renderer
By Qihong (Matthew) Tian→This project augments the original assignment by introducing a Mandelbulb fractal renderer using signed distance field (SDF) ray marching. The Mandelbulb is a 3D fractal defined by the iterative formula z_{n+1} = z_n^8 + c. The renderer features:
- Distance Estimator (DE): Implements the Mandelbulb DE in the fragment shader to calculate the distance to the fractal surface. (See
mandelbulb.cpp,fs_srcshader code.) - Ray Marching: Performs iterative ray marching to approximate the intersection with the fractal surface. (See
mandelbulb.cpp,marchfunction.) - Dynamic Coloring: Adds a vibrant, animated rainbow palette based on the fractal’s orbit trap. (See
mandelbulb.cpp,paletteandshadefunctions.) - Lighting and AO: Includes diffuse lighting, Fresnel reflections, and ambient occlusion for realistic shading. (See
mandelbulb.cpp,shadefunction.) - Camera Controls: Supports user-controlled orbit/zoom via libigl’s trackball and adds gentle auto-rotation for dynamic visualization. (See
mandelbulb.cpp,callback_pre_draw.) - Sky Gradient: Renders a dynamic sky gradient as the background. (See
mandelbulb.cpp,mainfunction infs_src.)
Acknowledgements
- Libraries: This project uses libigl for windowing and camera controls, and GLFW for OpenGL context management.
- References: The Mandelbulb distance estimator and ray marching techniques are inspired by Inigo Quilez’s articles on fractals.
- Tools: Built with CMake and Visual Studio 2022.