I'd like to see some elegant Perl.
Posted by jjwiseman at June 15, 2005 09:58 AMMight not be elegant, but here's an example of a very simple little ray tracer I wrote in perl (it only renders mirrored spheres and checkered planes)...
http://sleepingsquirrel.org/ray_trace/trace.txt
...it parses a POV-like scene file...
http://sleepingsquirrel.org/ray_trace/test.pov
...and produces a *.ppm file on STDOUT...
http://sleepingsquirrel.org/ray_trace/out.png
For those of you who don't know perl, you can look at the Haskell version...
http://sleepingsquirrel.org/ray_trace/trace.hs
I've always been meaning to write a Scheme version, maybe this will push me over the edge.
Posted by: Greg Buchholz on June 15, 2005 01:01 PM