Showing posts with label DIY. Show all posts
Showing posts with label DIY. Show all posts

Monday, December 29, 2014

3D (Anaglyph) Image With GIMP

What You Need:

1. A mobile/digital camera
2. A PC with GIMP (preferably running GNU/Linux)
3. Glass papers (red, blue and green colors)
4. Carton box (like the one comes with corn flakes, health drinks etc)
5. A pair of scissors
6. Glue

3D - An Introduction:

What ever we see with TWO eyes is 3D. Yes. It needs two eyes to resolve 3 dimensional visual. The same is true for hearing. How this happens? We have two eyes. But they are placed slightly apart on our face. This small distance between the eyes does the trick. Both our eyes send a two dimensional visual to our brain. and our brain merges them to resolve 3 dimensional vision. Closer the object, higher the difference between the images and farther the image lesser the difference between images created by right and left eyes. Using this, our brain creates a 3 dimensional vision.

Clicking The Photo(s!):

As we have seen in the introduction, we need two slightly different images of same object to create a 3D anaglyph. So take a photo with your digital/mobile camera and slightly move the camera few centimetres to left/right and click another image. Extreme care must be taken to avoid change in lighting, shakes and zoom levels. Try your best to keep the change in horizontal plane as much as possible (like our eyes which are horizontally separated). I have clicked first photo of this tiger doll and slightly moved the camera horizontally to left and clicked the second photo.
Right eye view
Left eye view
GIMP Work:

1. First open your right eye view image with GIMP

2. Go to Colors -> Desaturate and choose whatever shade of grey base you like. I have chosen Luminosity.
3. In color picker dialog choose red as foreground color. Make sure the values in Blue and Green fields are 0 and Red field is 255
4. Now go to Layers -> New Layer and choose foreground color. A red layer will be placed on your image! Don't panic!

5. Go to File -> Open as Layer and choose the left eye view image

6. Go to Colors -> Desaturate and choose exactly same shade of grey base as you chose in right eye view image.

7. A quick look in to your layer dialog will be like this!
8. In color picker dialog choose cyan as foreground color. Make sure the values in Blue and Green fields are 255 and Red field is 0
9. Now go to Layers -> New Layer and choose foreground color. A cyan layer will be placed on your image! Again, don't panic!

10. A quick look in to your layer dialog will be like this!
11. Select Cyan layer and choose the mode to "Screen"

12. Click on the eye icon in the layers to toggle visibility. If the eye icon is displayed, the layer is visible. Now make cyan layer and left eye image layer alone visible
13. Now your image will be like this. Go to Image -> Merge Visible Layers...
14. A quick look in to your layer dialog will be like this!
15. Select Red layer and choose the mode to "Screen"

16. Make red layer and right eye image layer alone visible


17. Now your image will be like this. Go to Image -> Merge Visible Layers...
18. A quick look in to your layer dialog will be like this!
19. Make both layers visible and select the cyan layer. Select mode as "Multiply"
20. If done correctly, your image will be like this. Export it as JPEG or PNG as you wish.

21. Fine tune your anaglyph by adjusting the layers while wearing the 3D red-cyan glasses (see below to know how to make it!)

Here is the anaglyph I have made!



The Glasses:

To make the glasses, you need red, blue and green glass papers. Cut two rectangles of red glass paper and one rectangle each of blue and green papers. Cut the frame of the glass from the carton box. Glue the red paper on one eye and blue and green on the other (to create cyan). I have made one within 15 minutes. The glass papers (large sheet) cost Rs. 5 each. You can make at least 10 glasses with a single purchase of glass papers.

Viewing:

Place the cyan side on your right eye and red side on your left eye. If you see ghost image, then move farther from screen or just zoom out the image. Outdoor images with farther backgrounds work better with this trick.

Conclusion:

So we have seen how to create an anaglyph with easy steps using GIMP. Also we have seen how to create 3D glasses at home cheap and easy! So enjoy your weekend with kids. If possible, kindly share your anaglyphs here!

Wednesday, October 22, 2014

DIY Cap Gun

The fireworks season is on! Diwali followed by Karthigai followed by Christmas followed by New Year, followed by Pongal! WOW! For next three months, there will be lot of dazzling colors and sounds (and also smoke and bit of paper!). What to do if the kids are demanding for lot of crackers and sparklers? How to divert them to do something useful and at the same time less polluting and cheap? This Do It Yourself (DIY) cap gun is one. When I was a kid, during a Diwali time, one of my friend introduced this in our street. Soon, everyone of us were bugging our parents/brothers/friends to help us in making our own cap guns and we almost lost our interest in everything else (sweets are exceptions as usual!). Let us see how to make it!

What you need?
Things you need
1. A hollow stick (I don't know the name of that plant we used, but any hollow stick that is strong and not so thick is suitable)
2. A large nail (4 or 4.5 or 5 inch nail according to the size of stick or availability)
3. A small nail (1 inch nail)
4. A bicycle wheel spoke with the nipple (screw like part that connects the spoke to the rim)
5. A rubber band
6. A knife to cut the stick

If you are below 15 years old, you also need an adult supervisor (preferably parent/elder sibling).

Steps:
Don't forget to get adult(s) help in case you are younger than 15!
1. Cut a 2 to 2.5 inch wide rectangle in the middle of the length of the stick up to half of the thickness (refer image).

2. Insert the large nail in the stick through the slit which we have cut. The head of the nail should be facing the opening of the slit (refer image). You may need some bits of paper or card to hold it tightly in place. You can use any suitable thing like large screws, flat head pins etc, preferably made of metal, in this place if you don't find a suitable nail.
3. Drive the small nail on the stick so that it is in the opposite side of the large nail (refer image).
Nipple end should be straight...
4. Bend the bicycle spoke as shown in the image.

5. Insert the bicycle spoke in to the stick, with the nipple facing the large nail and put the rubber band over the small nail and bent end of the spoke.
6. Drag the spoke and insert a spot cap or a single bit of torn roll cap in the space between the nail and spoke's nipple. Release the spoke, “Tzzaap!”

You can try with different shape of sticks. Also you can paint your gun or stick some color papers to improve its look. I once tied an empty soap box to the bottom and pasted black paper to give it a better look!

Advantages:

This gun will soon break or may need frequent tinkering. So this will keep the kids engaged in taking care of their home made guns and improving the same instead of demanding  you to buy another 1000-wala. Also it will make them proud that it is the gun they themselves have made and hence their happiness is much more compared to those who own costly cap guns and crackers. As the parts are fully bio degradable and caps cause relatively miniscule pollution, this is Eco-friendly too! You can think of lot many improvements and other such DIY toys. If you have any ideas, you can also share it with others! So have a creative, safe and responsible festival season ahead! Enjoy!