One of the most complex eyes in the animal kingdom can be found in species of stomatopod crustaceans (mantis shrimp), some of which have 12 different photoreceptor types, each sampling a narrow set of wavelengths ranging from deep ultraviolet to far red (300 to 720 nanometers). Functionally, this chromatic complexity has presented a mystery. Why use 12 color channels when three or four are sufficient for fine color discrimination? —Science, Vol. 343, 24 Jan 2014
shrimpray is my first project in Rust. It is an implementation of a ray tracer in Rust while following Ray Tracing in One Weekend Series as a guide. The style of code attempts to be idiomatic while minimizing mutables. Thread safe primitives for parallel processing. Monte carlo is used for the rendering to converge to an accurate image faster. The mantis shrimp is a cool creature.
Additional renders can be found under the render folder
# Build
cargo build --release
# Render to PPM
cargo run --release > scene.ppm
# Convert render to JPG
convert scene.ppm scene.jpg
Project under MIT License