lorimt: (Default)
lorimt ([personal profile] lorimt) wrote2009-08-07 02:07 am

Electronic funhouse mirror - or - Calling all ray-tracers?

I want to build a funhouse mirror. I even have convoluted plans. But first, I'd like to try out a few electronic tests. Specifically, I want to find/build/acquire some program that will let you specify the surface of a funhouse mirror (at whatever resolution makes suff work, but basically, a set of x-y-z coordinates), then give it an image that is assumed to be directly in front of it, and see the resulting tranformation/map.

Does anyone have any brilliant ideas? Ray tracing seems relevant here, but I know next to nothing about it. Any clues on where to get started would be excellent.

[identity profile] derakon.livejournal.com 2009-08-07 06:22 am (UTC)(link)
A little trig and a function describing the surface normal at any given point on the surface should be all you need. You take each pixel in the result image and backsolve to figure out where it came from in the source image (having some sane value for when the source pixel is out of bounds).

This is the kind of stuff we did in graphics in college, but I can't remember all the terminology involved.