September 22, 2013

A sweet graphics hack

From Fabien Sanglard's Website:
Decyphering the Business Card Raytracer
I recently came across Paul Heckbert's business card raytracer. For those that have never heard of it: It is a very famous challenge in the Computer Graphics field that started on May 4th, 1984 via a post on comp.graphics by Paul Heckbert ( More about this in his article "A Minimal Ray Tracer" from the book Graphics Gems IV).

The goal was to produce the source code for a raytracer...that would fit on the back of a business card.

Andrew Kensler's version is mesmerizing and one of the greatest hack that I have seen. Since I am curious, I decided to deconstruct it: Here is what I understood.

Edit : Andrew Kensler himself commented on Hacker News and adressed/elaborated on my observations: Thanks you so much Andrew :) !
This is about 1.3 K of tight C++ code and when compiled and run, produces this image:
20130922-ray-trace.jpg
What is amazing are the spheres, the graduated sky and the depth of field fuzzing on the floor. Posted by DaveH at September 22, 2013 2:15 PM
Comments
Post a comment









Remember personal info?