/ray-tracing-iow-scala

Ray Tracing in One Weekend written in Scala

Primary LanguageScala

ray-tracing-iow

Build Status

Ray Tracing in One Weekend Written in Scala

Animation

Run

Here is how to generate an image.

./make_jar.sh
./run_jar.sh > out.ppm

or

./make_jar.sh
./run_jar.sh --out-file=out.ppm

or

sbt "run --out-file=out.ppm"

Then you will get out.ppm image

Options

You can specify parameters by the options.

Usage: Ray Tracing in One Weekend Written in Scala [options]

  --width <value>          width (default: 600)
  --height <value>         height (default: 400)
  --min-float <value>      min-float (default: 0.001)
  --n-samples <value>      n-samples (default: 10)
  --random-seed <value>    random-seed (default: 101)
  --mode <value>           mode - image or anime (default: image)
  --anime-skip-step <value>
                           anime-skip-step (default: 3)
  --anime-dt <value>       delta t (default: 0.01)
  --anime-t-min <value>    anime-t-min (default: 0.0)
  --anime-t-max <value>    anime-t-max (default: 6.0)
  --anime-out-dir-path <value>
                           directory path of output anime images (default: anime_out)
  --img-format <value>     output image format (default: text-ppm)
  --out-file <value>       path of output file (default: stdout)

Change History

Here is the history of this repository. You can walk through the history

Tag Files at that point Diff Generated image
chapter1 files diff chapter1.png
chapter2 files diff chapter2.png
chapter3 files diff chapter3.png
chapter4 files diff chapter4.png
chapter5-1 files diff chapter5-1.png
chapter5-2 files diff chapter5-2.png
chapter6 files diff chapter6.png
chapter7-1 files diff chapter7-1.png
chapter7-2 files diff chapter7-2.png
chapter7-shadow-acne files diff chapter7-shadow-acne.png
chapter8-1 files diff chapter8-1.png
chapter8-2 files diff chapter8-2.png
chapter9-2 files diff chapter9-2.png
chapter9-3 files diff chapter9-3.png
chapter10-1 files diff chapter10-1.png
chapter10-2 files diff chapter10-2.png
chapter10-close-look files diff chapter10-close-look.png
chapter11 files diff chapter11.png
chapter12 files diff chapter12.png

References

Here is useful references.