Raytracer
A basic raytracer implementation in Rust based on the Ray Tracing in One Weekend book.
Result
How to Run
Standalone Binary
$ cargo run
The above command will produce a test.ppm
file in the same directory containing the rendered image.
WASM port for the Web
Install wasm-pack. Then run the following commands.
$ wasm-pack build
$ cd www
$ npm run start
It is hosted on GitHub Pages available at http://navinmohan.com/raytracer/
Adjusting the objects or camera
At this point, any changes to the scene has to be made directly inside the code. If you wish to modify the scene start with bin.rs
and lib.rs
.