Neil's News

+ 2010
+ 2009
+ 2008
+ 2007
+ 2006
+ 2005
- 2004
 Silence
 Snowflakes
 Paranoia Pays
 Microsoft Help
 Polyglot 11: More C
 Polyglot 11: C
 Polyglot 10: Smalltalk
 Toronto Wisdom
 Exterminated
 The Last Straw
 BT Broadband Trap
 Polyglot 9: Moo
 Polyglot 8: SVG
 Polyglot 7: POV-Ray
 Polyglot 6: Python
 Polyglot 5: PHP
 Polyglot 4: Euphoria
 Polyglot 3: JavaScript
 Polyglot 2: Java
 Polyglot 1: VB
 POV-Ray
 Etch A Sketch
 Slashdotting
 Flashy Lies
 Scientific Illiteracy
 Creeping Featurism
 VidScope
 Saturn V
 Perspectives
 Slide Rule
 eBay Sale
 Iron Filings
 Gimble
 VBA Security
 Random Morsels
 Exact Change
 Easter Egg
 Diametral Pitch
 mod_deflete
 Ethical Spam?
 Deadlines
 CPU Power
 Fosdem 2004
 Academic Reversal
 Mars Memorial
 Culture Clash
 Watching the Users
+ 2003
+ 2002

Polyglot 7: POV-Ray

25 September 2004

[POV-Ray] Seventh is POV-Ray. Whenever a program proudly claims to be "Turing complete" one knows right away that it's going to be a nightmare to use. Difference engines, dominoes and mousetraps with ping-pong balls are Turing complete, but actually doing something useful with them is another matter. Thus it was with some trepidation that I started working on a POV-Ray version of the colours program.

POV-Ray turned out to be the easiest implementation yet. The language is strong, the graphics are great, but most importantly the documentation seems to be psychic. I really don't know what else to call it. Every time I had a problem and typed something into the help, the answer was right there - complete with an example. It's even better than PHP's docs. Looking at POV-Ray's documentation objectively, I can't see anything special. It's just really well written. And that makes it a dream to use.

Here's the POV-Ray source code and a sample output. Rendering only takes a few seconds, but because POV-Ray uses macros instead of functions it means that five minutes are spent unrolling the recursive algorithm.

Once POV-Ray could generate 2D images, it was trivial to switch out of orthogonal mode, scale the pixels based on their colour, and render the scene in 3D. This is what I had in mind when I originally came up with the algorithm in 2000. At the time I was walking with Bess through the Scottish hills, and pondering how to generate the topology. It's taken four years to find a way to visualise it; looks good. I can see my house from here!

Update: Here's an unrelated rendering; I'm amused that the magnifying glass is powerful enough to start revealing individual pixels of the underlying image.

< Previous | Next >

 
-------------------------------------