@hackage glome-hs0.51

ray tracer

Glome.hs is a haskell port of my ocaml raytracer, glome. (http://syn.cs.pdx.edu/~jsnow/glome)

To compile on unix-type systems, execute "./make", to run, execute "./run".
Otherwise, invoke compiler commands manually.

Update: glome has been converted over to cabal, so you can now invoke

runhaskell Setup.lhs configure --prefix=$HOME --user runhaskell Setup.lhs build runhaskell Setup.lhs install

(The "make" and "run" scripts should still work.)

Glome.hs depends on opengl bindings, which come in the standard ghc distribution. Glome has been tested with ghc 6.8.2.

Features:

  • can load files in NFF format
  • handles diffuse illumination, shadows, and reflection
  • renders triangles, spheres, cylinders, cones, disks, boxes and planes as base primitives
  • supports csg group, difference, and intersection primitives
  • supports transformations (rotate, scale, translate) of arbitrary geometry
  • perlin noise and a few basic textures are implemented
  • uses a bounding interval heirarchy acceleration structure or you can construct a BVH manually with the "Bound" primitive
  • multiprocessor support is available, but it leaks memory and scaling is sub-linear
  • packet tracing (2x2) of primary rays is enabled by default
  • as of 0.5, glome uses type classes, and new primitives can be defined in their own module

Using: to load an NFF scene, run "./Glome -n [filename]". Otherwise, a default scene is rendered, defined in "TestScene.hs".

Many of the features are only accessible by programming directly in Haskell via TestScene.hs, as NFF does not support CSG or textures.

Refraction and photon mapping are not yet implemented.

-jim