This is the code to go with this blog post
This is a somewhat Incremental Ray Tracer (only incremental when materials change, not when spheres move).
Tuneable constants (
number of rays per pixel, etc) can be found in
This is my second piece of OCaml code ever so keep that in mind. If you have any tips please contact me at firstname.lastname@example.org