A ray tracing study and test written by C++.
Still studying, the code will be often updated.
The program is compiled by MinGW
. Please use MinGW
to compile it if you want to save the time. IF YOU CAN, you can use other compiler.
For most college students, they must have installed Dev-C++
to study C/C++
. If you did it, your computer have installed the MinGW
in the Dev-C++
installation path. If not, you can download it in its official website.
Find the exe named mingw32-make.exe
in the MinGW
installation path. In my computer the path is MinGW64/bin/mingw32-make.exe
. Please ensure the path is added to the environment PATH
.
After that, go to the program folder, open the command line and input like this:
$ mingw32-make
$ main
Wait a moment, after rendering you can find test.png
in the folder.
No complicated and new C++ feature, based on very easy C++.
Be suitable for the people who know about C++, begin to study Ray Tracing.
There is no comment in the code, I will add it in the future.
1920*1080, sample times: 20, all Phong Material
1920*1080, 20 sample times, left Cook-Torrance Material, right Phong Material
- JavaScript玩转计算机图形学(一)光线追踪入门
- Phong光照模型
- Ray Tracing in a weekend
- Cook-Torrance光照模型
- 《计算机图形学与虚拟环境》 机械工业出版社