Ray Tracing in One Weekend written in Rust
- Written in Rust
- Parallel processing by Rayon
- Animation
- Reproducible random generation
Create one image.
cargo run --release -- image.ppm
Here is very small video generation.
# Generate .ppm files
cargo run --release -- --width=60 --height=40 --anime-out-dir-path=my_anime
# Create anime.mp4
cd my_anime
ffmpeg -i anime%08d.ppm -c:v libx264 -vf fps=25 -pix_fmt yuv420p anime.mp4
ray-tracing-iow 0.1.0
Ryo Ota <nwtgck@gmail.com>
Ray Tracing in One Weekend in Rust
USAGE:
ray-tracing-iow [OPTIONS] [file]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--anime-dt <anime-dt> Animation dt [default: 0.03]
--anime-max-t <anime-max-t> Animation max time [default: 6.0]
--anime-min-t <anime-min-t> Animation minimum time [default: 0.0]
--anime-out-dir-path <anime-out-dir-path> Animation output directory
--height <height> Image height [default: 400]
--min-float <min-float> Minimum float number [default: 0.001]
--n-samples <n-samples> Number of samples [default: 10]
--random-seed <random-seed> Random seed [default: 101]
--width <width> Image width [default: 600]
ARGS:
<file> Output file path
Here are related projects.
- iyahoo/clj-ray-tracing (Clojure)
- petershirley/raytracinginoneweekend (C++)
- nwtgck/ray-tracing-iow-scala (Scala)