Skip to content

tuzz/ray_tracing_in_one_weekend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ray Tracing in One Weekend: Series

My C99 implementations of Ray Tracing in One Weekend and Ray Tracing: The Next Week by Peter Shirley, Trevor David Black, Steve Hollasch. My implementation uses tagged unions rather than polymorphism.

Usage

You can render the scenes below as follows:

cd ray_tracing_in_one_weekend # or ray_tracing_the_next_week
./scripts/build_release
./build/release/main > image.ppm
open image.ppm

The ray tracer is single-threaded so it will take about an hour to render the first scene and about three hours to render the second scene. You can speed it up by by reducing image_width or the number of samples_per_pixel in the main function, or by choosing a different scene from the list available.

Renders

Ray traced image 1

The final image from 'Ray Tracing in One Weekend'



Ray traced image 2

The final image from 'Ray Tracing: The Next Week'



Ray traced image 3

The 'simple light' image demonstrating Perlin noise



Ray traced image 4

The reference 'Cornell Box' image

About

My C99 implementation of Ray Tracing in One Weekend.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors