A GPU accelerated Julia Set fractal interactive viewer implemented in C++ that supports rendering through OpenGL or OpenCL. Giulia also features a Mandelbrot renderer.
Check out these sources if you wish to learn about the Julia Sets, fractals and their relation to the Mandelbrot Set:
- Julia set - Wikipedia
- The Julia Sets: How it Works, and Why it's Amazing! - Youtube
- What's so special about the Mandelbrot Set? - Youtube
- The Mandelbrot Set - Youtube
- Filled Julia Set - Youtube
- Julia and Mandelbrot renderings
- Real-time Rendering
- Dynamic parameters
- Panning & Zooming
- Single or Double precision
- Number of calculations per pixel
- Compute mode (OpenGL or OpenCL)
- Imgui based GUI
- C++14 standard
- CMake based
- OpenGL & OpenCL Interoperation
The Cherno for his awesome Youtube Channel and OpenGL tutorials.
The Jiulia Set is defined according to the following equation:
Giulia lets you tweak both n and c and see the result in real-time.
Use the check boxes to change rendering modes. There are no visual differences but trust me, under the hood this is completely different.
Use the check boxes to switch precision modes. Only needed if you zoom in enough. This has absurd impact on performance. OpenGL only.
Tested build environments:
- Ubuntu 20.04
- Ubuntu 20.10
# Install OpenGL related dependencies
sudo apt install mesa-utils freeglut3-dev libglew-dev libglfw3-dev
# Install OpenCL related dependencies
sudo apt install opencl-headers ocl-icd-opencl-dev
# Fetch
git clone https://github.com/bernardocrodrigues/giulia.git giulia && cd giulia
# Configure
mkdir build && cd build
cmake ../
# Build
make
./src/app/Giulia
- Create a static target for releases
- There's no standalone bin being produced so the app can be easily distributed on-line. You'll have to install all build dependencies and build it locally to run Giulia
- Implement CI
- Print the value of c used in the Julia rendering
- Improve way bin reads OpenGL & OpenCL kernels
- Maybe put them as static strings on a header?
- Implement remaining OpenCL features
- Double precision
- Color schemes
- Full screen Viewing
- Intelligent frame drawing
- Only draw a new frame if something has changed; there's no point in redraw the same frames over and over
- Low Resolution rendering
- This could be used to improve panning on compute costly regions, especially when using double precision.
- Support for variable screen size