Saturday, January 8, 2011

It's fun to fool Mother Nature

One of the problems with modern computers and digital photography is that you can't trust any image!  The following is a photo that, on first inspection, appears to be a real snowflake  with five "spokes"!


Unfortunately, nature doesn't do this sort of thing!  Snowflakes are crystals of hexagonal ice, and are always of hexagonal symmetry.  You can read all about snowflakes by going to Kenneth Libbrecht's excellent site, SnowCrystals.com.

How did I do this?  It was actually quite fun, and the technique can probably be used to manipulate other images that have some sort of axial symmetry.  The following gives the step-by-step operations that were used to create the five-fold symmetry using PhotoShop CS5.

The original photograph was taken using my photomicrography setup for snowflakes*.   While one could spend quite a bit of time cleaning up this image, I purposely left it in a rather crude state so that it looked "real".
The next step is to accurately position the image in the center of a square frame.  There are probably many ways to accomplish this, but I first used the "Image/Canvas Size" instruction to make the image square.  I then used the Line Tool to create an "X" as shown in the image.
I then used the "Move Tool" (v) and moved the image until the snowflake was precisely centered.  It is wise to enlarge the image to 200% or higher to make the centering as accurate as possible.
The next step is to use the "Ruler Tool", followed by "Straighten" ( or "Image/Rotate/Arbitrary" in as in CS4) to insure that one of the spokes is vertical.
The next operation is to  use the "Filter/Distort/Polar Coordinates" tool, selecting the "Polar to Rectangular" option.  The resulting image will appear somewhat like the image shown.  You will find that the is terribly sensitive to where the center of the image is in the canvas.
The next step is to carefully remove one of the spokes by using the crop tool, and then again adjust the Canvas Size to make the image perfectly square again.
The above image is then converted back to a snowflake by using the "Rectangular to Polar" option in the "Filter/Distort/Polar Coordinates" tool.  (There is a bug in CS5 that tends to screw up the Polar Coordinate conversion--if it happens to you simply save the image above and restart CS5.)
You get your final image by cropping and cleaning up any slight imperfections such as the vertical seam seen above.







Once you have mastered the technique, you can create snowflakes with as many spokes as you wish!  Note that you can also make more perfect snowflakes by simply creating a line of "spokes" in a square frame and then converting to the snowflake using the Polar Distortion filter.  How about an 11 pointed snowflake?

Or a seven legged starfish?

___________________________________________________
*You can take a look at the microscope setup I use for photographing snowflakes at Xraycrystallographer.blogspot.