Skip to content

johnyob/ocaml-raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OCaml-Raytracer

A simple OCaml Raytracer based on my notes from the Cambridge Graphics course and the ''Fundamental of Computer Graphics'' book.

A functional realization of a raytracer taking advantage of OCaml's module system and algebraic data types; in an attempt to generalize the interfaces of components within a raytracer.

Some features of the raytracer:

  • Surfaces: Spheres and planes.
  • Materials: Lambertian, Metallic and Dielectric materials.
  • Camera: Defined using a viewer, view plane and projection.
  • Gamma correction.

Images are stored in a PPM format, with image.ml ported from FoCS tick 5 (Thanks Anil!).

An example scene (specified by Peter Shirley's mini-book series Raytracing in One Weekend): Scene

About

A simple OCaml Raytracer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published