A simple visualization showing how light rays interact with circular objects using SFML as a graphic library.
C++
SFML
- CMake
- GCC compiler
- VsCode IDE
- Linux
- Windows
.
├── CMakeLists.txt
├── inc
│ ├── Constants.hpp
│ ├── Light_Circle.hpp
│ └── Movable_Circle.hpp
├── README.md
└── src
├── Light_Circle.cpp
├── main.cpp
└── Movable_Circle.cpp
The CMakeLists file already includes a fetching functionnality in case SFML isn't already installed in your computer. You can directly use the following commands after cloning the project :
cmake -B build # generates build files
cmake --build build # compile
Before running, you may need to pay attention to the number of iterations defined in the include/Functions.h directory. The default number of light rays has been set to 300 but you can set it to whichever value you want by changing the defined value of CIRCLE_POINT_COUNT in the Constants.hpp file. After fixing the number of light rays, you can run the visualization using this command :
./build/Fractale # run
SFML >= 3.0.0 # Used as graphic library