Skip to content

ReyChiaro/TinyRT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌈 TinyRT: A Tiny Ray Tracer from Scratch

Tutorial: Ray Tracing in one Weekend

🖼️ Quick Start~

Build with xmake (see xmake.lua for more configs),

# Clone this repo
git clone https://github.com/ReyChiaro/TinyRT.git

# cd to the project and build with xmake
xmake

# Then run and output
xmake run > outputs/spheres.ppm

Check the output, you will get something like this: sphere_demo

Note that as a tiny project, we use .ppm as the image output format, which is extremely simple.

To add more cute spheres to the world, check the main function (src/main.cpp):

auto world = hittable_list();

// sphere(<sphere_center>, <radius>)
world.add(std::make_shared<sphere>(point3d(-0.1, 0, -1), 0.5));
world.add(std::make_shared<sphere>(point3d(0.2, -0.1, -0.5), 0.1));
world.add(std::make_shared<sphere>(point3d(0, -100.5, -1), 100));

About

A tiny ray tracer implemented by cpp.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors