Skip to content

nwtgck/ray-tracing-iow-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ray-tracing-iow

CircleCI

Ray Tracing in One Weekend written in Rust

Ray Tracing Animation

Features

  • Written in Rust
  • Parallel processing by Rayon
  • Animation
  • Reproducible random generation

Usage

One image generation

Create one image.

cargo run --release -- image.ppm

Animation generation

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

Other options

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

Related projects

Here are related projects.