This is a compact educational ray tracer in one source file that outputs an ASCII PPM image to stdout.
cargo build --release
# produce an image (scene 3, 800x600, recursion depth 3)
./target/release/rust_raytracer 3 800 600 3 > output.ppm1 - single sphere 2 - plane + cube (lower brightness) 3 - all objects (sphere, cube, cylinder, plane) 4 - same as 3 but different camera position
- argument 1: scene id (default 3)
- argument 2: width (default 400)
- argument 3: height (default 300)
- argument 4: max recursion depth for reflections (default 3)