A C++ application that renders a 3D cube with dynamic quality settings based on fuzzy logic. The renderer automatically switches between wireframe, flat shading, and smooth shading based on system performance metrics.
- 3D Cube Rendering: Renders a 3D cube using modern OpenGL.
- Dynamic Quality Switching: Automatically adjusts rendering quality based on fuzzy logic.
- Interactive Controls: ImGui interface for adjusting fuzzy logic parameters and camera controls.
- Python Integration: Uses the Python C API to call a
scikit-fuzzylogic module in real-time.
There are two ways to set up the project. The recommended method uses Nix to provide a fully reproducible environment automatically.
This method automatically provides all the correct versions of the required system libraries and Python packages.
- Install Nix on your system if you don't have it already.
- Clone the repository and fetch the required ImGui submodule:
bash git clone <repository_url> cd fuzzy-visualizer git submodule update --init --recursive - Activate the Nix environment. This command reads the
shell.nixfile and installs all dependencies into a temporary shell.bash nix-shell - Build and Run the application using the provided script.
bash ./run.sh
This method requires you to install all dependencies on your system manually.
- Clone the repository and fetch the required ImGui submodule:
bash git clone <repository_url> cd fuzzy-visualizer git submodule update --init --recursive - Install System Libraries. The following command is for Arch
Linux. For other distributions like Debian/Ubuntu, you'll need to
find the equivalent packages (e.g.,
libglfw3-dev,libglew-dev,libglm-dev).bash sudo pacman -S glfw-x11 mesa python glm glew wayland - Install Python Dependencies using pip.
bash pip install -r requirements.txt - Build and Run the application using the provided script.
bash ./run.sh
fuzzy-visualizer/ ├── src/ # C++ source code (.cpp) ├── include/ # C++ header files (.h) ├── shaders/ # GLSL shader files ├── vendor/ # Third-party libraries (e.g., ImGui) ├── fuzzy_module.py # Python fuzzy logic module ├── shell.nix # Nix environment definition ├── run.sh # Build and run script └── requirements.txt # Python dependencies for manual setup
- GLM not found: Install GLM development headers. (For manual
setup)
bash sudo pacman -S glm - Python headers missing: Ensure the Python development package is
installed. (For manual setup)
bash sudo pacman -S python - Fuzzy module import error: Ensure Python dependencies are
installed. (For manual setup)
bash pip install -r requirements.txt - Missing library on Nix: If you get a "file not found" error
during compilation inside
nix-shell, a package is likely missing from thebuildInputsinshell.nix.
This project is open source. Please check individual vendor libraries for their respective licenses.