-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create build config. Using dune (and opam)
- Loading branch information
Showing
5 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,19 @@ | ||
# OCaml-Raytracer | ||
A simple 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 ray tracer: | ||
- 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](https://github.com/avsm)!). | ||
|
||
An example scene (specified by Peter Shirley's mini-book series [Raytracing in One Weekend](https://raytracing.github.io/)): | ||
 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(executable | ||
(public_name main) | ||
(name main) | ||
(libraries raytracer)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(lang dune 1.2) | ||
(name ocaml_raytracer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(lang dune 1.2) | ||
(context default) | ||
(env | ||
(dev | ||
(flags (:standard -w -6)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(library | ||
(name raytracer) | ||
(libraries base stdio)) | ||
|
||
(include_subdirs unqualified) |