My little raytracer, written in Rust, was created to gain first experience with Rust. It was fun 🤖
My learning purpose is done with this project so further improvements that are obviously missing, will not be done.
cargo build
The output image is being written in the text format PPM to the standard output stream. The geometry, light and raytracing parameters are in the code in various files.
cargo run > image.ppm
You can easily change the geometry (as long as you want spheres or planes) and the light configuration in main.rs as well as raytracing parameters like
- number of rays per pixel (monte carlo sampling, average value is taken)
- number of rays for each global illumination computation on a surface hit point
- resolution of output image
This is what it renders with the current configuration: