A simple implemention of ray tracing. Written by pure C++, without any 3rd library.
cd TinyRayTracer
mkdir build
cd build
cmake ..
make
Take Visual Studio as an example
- Make sure you have installed cmake for windows and launch CMake-GUI.
- Browse Source(Path of TinyRayTracer) and Browse Build(Destination path)
- Click configure and Select Visual Studio on the popuped dialog.
- Generate
- The .sln will be located in the Destination path.
cd ../bin
chmod +x tray #optional
./tray
Run the tray.exe in the TinyRayTracer/bin directory.
The tray program will read the file 'world.txt' and generate a ppm image file 'output.ppm', which can be opened by xnview or photoshop or any other ppm supported image viewer. You can change the world.txt following the instruction.
Have fun :)