Monthly Archives: June 2012

Making 3D pictures in The Gimp

For my 4Dth birthday, I’m designing a scavenger hunt which will include several 3D pictures which require red/blue 3D glasses to view. It’s easy to make them in The Gimp (or Photoshop, if you have a wad to blow on such things.) Figuring out exactly how to do it isn’t so easy. The basic idea is to merge two photos, one from the left eye’s perspective and the other from the right eye’s perspective. The final image should have only the red component of the left-eye picture and none of the red component of the right-eye picture. If you’re shooting a still life, use any camera and take one photo slightly to the left of the other. For close-ups, the eye separation should be very small: an inch at most. For a scene of a room, the eyes should be a natural distance apart, about 3 inches.

  1. For the left eye picture, add a layer above the photo filled with pure red ( RGB, a.k.a. #ff0000).
  2. Set the mode for that layer mode to “Addition.” You should see the photo in colors ranging from black to red. With your 3D glasses on, the red lens should show the picture as it appears on the screen, the blue lens should show a black picture.
  3. Under the Layer menu, select “Merge Down” to combine the two layers.
  4. For the right eye picture (a separate document), add a layer above the photo filled with pure blue-green ( RGB, a.k.a. #0000ff).
  5. Set the mode for that layer to “Addition”. With your 3D glasses on, you should see black through the left (red) eye.
  6. Copy (or “copy visible”) this picture.
  7. Paste into the other (left eye) picture. After pasting, hit the “new layer” button in the Layers dialog to turn the floating pasted image into a layer.
  8. Set the layer mode to “Multiply.” You should now have a different photo visible through each lens of your 3D glasses.

Scala emoticons

There are a lot of great things about Scala, but there are a few things where that programming language just goes overboard. Consider that there are several emoticons built into the standard library:

  • +:= (vampire pope) for adding items at the front of a sequence
  • <:< (sad witch) for comparing generic types
  • :/ (uneasy) fold right

And that’s just the ones I know about. Unfortunately, you can’t use a search engine to find any more, because none of the major search engines index emoticons. :/ (try it). Fortunately there is a well-hidden reference page.

Post a comment if you find any more.