Transformation

I took the second half of the History of Creativity course this semester. For the first half my project was the Park in the Shade app described in previous blog posts. (here and here). This time around I wanted to make something a little less useful, a little more "creative".

One Electrical Engineering class I took this semester focused on various transformations. These are extremely useful because they make it possible for engineers like me to build things like MP3 players and stuff. The idea is that by doing some clever math, suddenly we have a signal (like a sound wave) in a new domain, which let's use do even more clever math. Lots of clever math, we actually use imaginary numbers a lot here. By imaginary numbers I mean sqrt(-1) and such, not numbers like eleventy billion as my wife believes. But the end result is that you can carry a little device in your pocket that can recreate a sound wave almost perfectly. Cool stuff.

So I decided to create an art piece called Transformation. I started with this image:

I then did a few simple things to it.  First, I shrunk it down from 100x100 pixels to 20x20.  100x100 was just too big to work with.

Now it looked grainy and course, but you could still see what it was.  Then I converted it to Grayscale.

Once it was in grayscale, it meant I had 400 values (20x20 pixels), with each value represented as a number between 0 (black) and 255 (white).  I quantized these values, essentially rounding them down to the nearest 20.  So values between 0 and 19 would get 0.  Values between 20 and 39 would get 20.  And so on.  So instead of 255 possible values, I only had 13 values, in steps of 20.  This didn't have a huge effect, as you can see, but it helped with my final step.

For my final step, I took the values from the above image, and converted them to depth in a 3D model.  I wrote a clever little script that output this grid:

02 01 00 03 06 04 03 02 00 00 00 00 05 02 01 01 00 00 01 02  
08 01 01 02 02 02 02 03 01 00 00 02 03 03 03 03 01 00 01 02  
02 02 02 01 02 01 07 08 08 08 08 03 01 03 03 02 03 00 00 01  
01 02 02 03 01 06 08 07 07 07 07 07 06 05 01 01 03 05 01 02  
01 05 03 03 04 07 06 06 07 07 06 07 07 09 01 01 01 03 02 03  
01 03 03 05 05 05 04 02 05 03 05 07 02 04 10 01 03 05 01 02  
04 01 03 03 04 04 04 05 06 04 05 06 03 04 07 09 06 01 01 02  
04 03 06 05 03 09 01 02 06 05 05 04 06 07 06 07 10 08 01 00  
01 01 04 06 12 10 09 08 02 04 04 03 02 01 04 04 07 09 09 06  
02 02 01 06 10 09 07 07 08 04 05 02 01 05 04 08 08 08 10 10  
05 02 02 10 11 07 04 04 05 02 08 06 08 06 03 04 06 07 09 10  
07 08 11 10 10 04 03 01 05 03 06 10 05 09 00 06 03 06 08 09  
05 10 09 10 09 02 02 04 04 01 11 03 09 09 01 03 03 05 07 08  
06 09 10 10 00 00 03 00 04 03 09 00 10 09 09 04 03 03 04 07  
10 09 09 09 00 00 00 00 03 05 10 09 09 09 05 02 07 06 09 08  
07 09 10 10 11 12 00 01 00 01 07 06 07 08 02 04 06 08 07 08  
07 07 10 10 09 10 10 12 09 12 12 09 10 09 05 05 10 08 08 08  
07 08 08 09 08 09 11 12 12 12 11 12 12 12 12 09 08 07 08 08  
04 03 09 08 05 11 11 05 07 08 12 04 01 10 11 10 07 07 08 09  
04 04 07 07 03 11 11 12 05 07 09 04 03 09 11 11 04 05 08 00  

Each number above corresponds to the length of a wooden dowel.  The measurements are in quarter inches, so a 10 would mean 2 1/2 inches, a 12 would mean 3 inches, etc.  Once I had the grid laid out for me, I assembled the dowels that I had cut.  The final result was this:

It's hard to show it in a photo, but it was amazing how well this process created a 3D model from a 2D image.  His arms and head are clear enough.  His eyes and mouth are pretty clear as well.  There are a few interesting artifacts.  In the top left corner, there's a random dowel sticking out.  If you look in the original image, there's a fan in that corner wearing a white shirt.  Jimmer's hair, since it's darker than his face, seems to disappear.  But overall, shape seems to be kept intact.

It was a fun little project.  Not all that useful, but interesting nonetheless.  It would be cool to use my script to produce a little finer image.  Maybe use a 3D printer like a RepRap, so I could keep the image at full resolution.  I shrunk the image down to 20x20 because even then I had to cut and assemble 400 dowels.  At full resolution that would have been 10,000.  With a RepRap, I wouldn't have to care.  It would take a bit longer to print, but that's not a big deal.

Anyone else got any interesting applications / improvements?

comments powered by Disqus