A raytracer implemented in Clojure based on The Ray Tracer Challenge. Companion of disposedtrolley/raytracer.
- JDK 11, i.e.
brew install openjdk@11
- Clojure CLI tools
The tick
namespace provides two run
functions to showcase the current state of the raytracer.
run
simulates a projectile moving through an environment after it's fired. The various positions of the projectile result in an arc.clj -X raytracer.examples.tick/run
clj -X raytracer.examples.tick/run :velocity-multiplier 4
run-with-canvas
performs the same simulation asrun
, but will plot the positions of the projectile on a canvas which is then saved as a PPM file. The canvas is fixed-size so the velocity cannot be adjusted via a multiplier.clj -X raytracer.examples.tick/run-with-canvas :outfile '"/full/path/to/outfile"'
bin/kaocha