Skip to content

A ray tracing study and test written by very easy C++.

Notifications You must be signed in to change notification settings

Crawler995/Cpp-Ray-Tracing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cpp Ray Tracing

A ray tracing study and test written by C++.
Still studying, the code will be often updated.

Compile

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.

Feature

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.

Render result

1920*1080, 20 sample times, all Phong Material 1920*1080, sample times: 20, all Phong Material

1920*1080, 20 sample times, left Cook-Torrance Material, right Phong Material 1920*1080, 20 sample times, left Cook-Torrance Material, right Phong Material

Reference

  1. JavaScript玩转计算机图形学(一)光线追踪入门
  2. Phong光照模型
  3. Ray Tracing in a weekend
  4. Cook-Torrance光照模型
  5. 《计算机图形学与虚拟环境》 机械工业出版社

About

A ray tracing study and test written by very easy C++.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published