PCPlus 295: Raytracing revealed

This article followed on from the previous, as it happened. You see I’d painstakingly drawn the figures for the pentominoes article in Adobe Illustrator and I got to wondering if there was an easier way to create them. I half-remembered about ray-tracing (my friend Duncan had created some great images a while back) and so I looked it up. A couple of links later I had POV-Ray downloaded and installed and was playing around. Naturally, the ray-traced image I spent most time on for this article was an image showing a pentomino solution. I even wrote about it on this blog at the time.

Raytraced pentomino solution

Not much else to report about this article. I did some research on how it all worked (lots of mathematics!) and essentially presented that from a layman’s viewpoint. Basically you view the image as a viewport onto a scene. For each pixel in the viewport you trace back the ray of light that produced the pixel value, taking into account reflections from and refractions through the objects in the scene. Lots of computation later, and you have a very photo-realistic image.

In reality, playing with POV-Ray is a hoot. You tweak here and there, defining your objects, their color and transparency, and let it rip generating the image. Rinse and repeat.

PC Plus logoThis article first appeared in issue 295, June 2010.

You can read the PDF here.

(I write a monthly column for PCPlus, a computer news-views-n-reviews magazine in the UK (actually there are 13 issues a year — there's an Xmas issue as well — so it's a bit more than monthly). The column is called Theory Workshop and appears in the Make It section of the magazine. When I signed up, my editor and the magazine were gracious enough to allow me to reprint the articles here after say a year or so.)

Album cover for Shaking the Tree: Sixteen Golden GreatsNow playing:
Gabriel, Peter - Family Snapshot
(from Shaking the Tree: Sixteen Golden Greats)

Loading similar posts...   Loading links to posts on similar topics...

No Responses

Feel free to add a comment...

Leave a response

Note: some MarkDown is allowed, but HTML is not. Expand to show what's available.

  •  Emphasize with italics: surround word with underscores _emphasis_
  •  Emphasize strongly: surround word with double-asterisks **strong**
  •  Link: surround text with square brackets, url with parentheses [text](url)
  •  Inline code: surround text with backticks `IEnumerable`
  •  Unordered list: start each line with an asterisk, space * an item
  •  Ordered list: start each line with a digit, period, space 1. an item
  •  Insert code block: start each line with four spaces
  •  Insert blockquote: start each line with right-angle-bracket, space > Now is the time...
Preview of response