A toy ray tracer implemented in Rust following Peter Shirley's book Ray Tracing in One Weekend. The corresponding C++ code can be found in the original repository.
Each commit in this repository corresponds to a chapter in the book and is compilable.
$ cargo build --release
USAGE:
tachibana [OPTIONS] [out_file]
FLAGS:
--help Prints help information
-V, --version Prints version information
OPTIONS:
-h, --height <height> [default: 1024]
-b, --max_bounces <max_bounces> [default: 50]
-s, --max_spheres <max_spheres> [default: 500]
-r, --rays_per_pixel <rays_per_pixel> [default: 100]
-w, --width <width> [default: 2048]
By default the tracer saves the output to out.png
in the current directory.
The code in this repository is released to the public domain (CC0 1.0 Universal), same as the original code this work is based on.