An open API service indexing awesome lists of open source software.

https://github.com/kach/voxel

Yet another raytracer, because we don't have enough of those already
https://github.com/kach/voxel

Last synced: 4 months ago
JSON representation

Yet another raytracer, because we don't have enough of those already

Awesome Lists containing this project

README

          

Sometime in June 2016 I decided to revisit raytracers, and to see how much of a
raytracer I could build without looking anything up. `voxel.scm` is a full
recursive raytracer optimized for voxels. It uses the Phong illumination model
(ambient + diffuse + specular). Nothing fancy.

`voxel.scm` contains a homemade BMP encoder, and, with appropriate `load-*`
headers, it should work with any R5RS Scheme implementation. I tested it with
Chicken and Racket, and also with Biwas though Biwas was sadly too slow to be
practical.

This is the kind of thing `voxel.scm` can do very quickly:

![Here's a thing](temp.png)

It turns out you can find a [CT
scan](http://graphics.stanford.edu/data/voldata/voldata.html#bunny) of the
Stanford Bunny online. This is what you get if you approximate it with a
hundred voxels:

![Here's a bunny](bunny.png)

For comparison, here's some output from my old (December 2012) raytracer:

![Here's a sphere](sphere.png)