- Table of Contents
- 📖 About
- 🌟 Showcase
- ✨ Features
- 📦 Structure
- 📚 Libraries
- 🔧 Build
- 🚀 Releases
- 📜 License
This lightweight C/C++ application lets you generate and explore colorful fractals in real time, leveraging the power of the GPU. You can zoom in and out and navigate the complex plane using your mouse.
To enable deep zoom capabilities, the program simulates double-precision calculations on the GPU. This boosts the accuracy of computations, allowing for much deeper zoom levels.
-
Project
-
🔄 Reproducible: Built with Nix, this configuration can be effortlessly reproduced on other machines, ensuring a consistent setup.
-
📖 Documented: Most of the parts of my configuration files are commented and documented with links and explanations if necessary
-
-
Application
-
🌀 Real-time fractal generation: Utilizes GPU acceleration to render fractals instantly.
-
🎨 Colorful visualizations: Generates vivid, dynamic color schemes for fractals.
-
🖱️ Interactive exploration: Navigate the complex plane with your mouse — zoom in, zoom out, and pan smoothly.
-
🔍 Deep zoom support: Emulates double-precision floating point on the GPU to allow ultra-deep zoom levels without significant loss of precision.
-
⚙️ Written in C/C++: Lightweight and efficient native application using C/C++ for high performance.
-
🧮 High precision computation: Enhanced numerical precision enables detailed and accurate fractal rendering even at extreme zoom levels.
-
-
Directories
-
Files
flake.nix
- Environment configuration (based on dev-templates).envrc
- Used by direnv to load Flakesflake.lock
- Used by Flakes to version packagesCMakeLists.txt
- CMake configuration to build the project
- Dear ImGui ~ Bloat-free Graphical User interface for C++ with minimal dependencies
- SFML ~ Simple and Fast Multimedia Library
- GLAD ~ OpenGl loader
Note
Looking at the source code of SFML, it appears that stb and GLAD are already included (but I keep them here anyway).
Note
I'm using NixOS as my day-to-day OS, and I have found that Nix with Flakes was the simplest and fastest way for me to setup C/C++ project with external libraries.
To build this project, first make sure you have Nix installed as a package manager and direnv as a shell extension.
Then, configure it to enable Flakes according to your setup.
Once you're ready, you can start by cloning this repo
git clone https://github.com/leoraclet/fractals
cd fractals
Tip
Now, direnv should load the environment when inside the project directory, if not, try
direnv allow
The flake.nix
file is where the project's environment is defined, and you can see in it that
CMake is part of the packages. So, if everything went well, you should be able
to build the project like so
cmake -B build -S .
cd build
cmake --build .
Then, you can run the produced executable in build
with
./fractals
Warning
I have NOT tested the building process on Windows, so you're basically on your own for this.
The best solution to build this project on Windows is to use WSL and follow the Nix way in it.
You can start by installing nix here.
To run the program without editing the source code or building it yourself, go see the Releases.
This project is licensed under the MIT License - see the LICENSE file for details.