Thursday, December 24, 2009

"Which way did the bicycle go?"

Problem: If you are given the plot of the tracks traced by the front and rear wheel of the bicycle, how will you tell which direction the bicycle was going? For e.g. consider these two figure


In these two figures, how would you decide which direction the bicycle was going i.e. right to left or left to right ? What would be the idea or basis behind your method ?

I came across this problem while reading the book "Which way did the bicycle go? and other intriguing mathematical mysteries" by Joseph D. E. Konhauser, Dan Velleman and Stan Wagon, published by the Mathematical Association of America. As mentioned in the preface of this book, it is a collection of some 190 problems taken from the "Konhauser collection". The problems are grouped under six main topics (plane geometry, number theory, algebra, combinatorics and graph theory, three-dimensional geometry, and miscellaneous) each of which has further sub-groups.

As for the level of mathematics needed, I have not gone through the full book but based on the problems which I have read, I think mathematics up to 12th standard might be enough. Get the book and have fun solving problems.

Sunday, December 20, 2009

Making part of the image black and white in Gimp

Here is a way of making a part of the image B&W in Gimp. The basic idea is to select the portion which we want to change and while keeping it selected, make the changes. In case the part which needs the change is the major portion, it might be easy to select the rest of the portion and then invert the selection. Here I will let the speed and roundabout sign in yellow remain as it is and make changes to the rest of the figure.

(1) Open the image in Gimp

(2) Select the "zoom" tool

(3) Zoom-in on the yellow sign by repeatedly clicking on it

(4) Select the "path" tool


(5) Using the path tool draw the outline of the yellow sign. You will notice that as you click, small circles will be made at the point where you click. Also, the latest point is connected to the previous one making a "path". In order to end or close the path, after you have gone all around the sign, click on the very first circle.


(6) Now from the "select" menu click on "from path"

(7) When you do so the circles and dash line made by the path tool will all be connected, and you have a dash (moving ant like) line on the outline of the yellow sign.

(8) From the "select" menu click on "invert". As of now everything inside the path is selected, with "invert" everything outside the current selection will be selected.

(9) Use the zoom tool to zoom-out to see the full image.

(10) From the "color" menu select "desaturate"

(11) In the picture everything except for the yellow sign will turn B&W. Also you will be presented with three options of how to desaturate. You can click on each and see which you like best.

(12) Now that its B&W, for a final touch we can adjust the contrast. To do so, from the "color" menu select "brightness and contrast".

(13) Use the slider to increase the contrast to the level you want.

(14) Finally, from the "select" menu click on "none" to remove any current selections.

(15) Now that its done, it may be saved in this final version.

There are other methods of doing this but for this image I think this is the simplest way.

Tuesday, December 8, 2009

The dust particle that occupied my mind

Problem

Using my Nikon D40 I took some pictures and in all of them I could see a spot in the middle.

I could see a spot both (a) when looking through the view-finder and (b) in the final picture. Haven't found out how to get rid of the spot on the view-finder but will tell how to do that if its caused by some dust particle on the sensor.

Testing for dust particles on the sensor

This is what I read on the internet. I don't remember the exact advise and reasoning but this is essentially what I did after reading that page.

(1) Set the focal length to maximum.
(2) Set the aperture to minimum.
(3) Set the focus (manual) completely off.
(4) Take a picture of a blank white sheet.
(5) Look at the picture and check for black/grey spots.

In my case, I could anyway see the spot in the final pictures, but when I did this then the spot was more prominent.

The solution: Blow air and clean the sensor/filter

Long story short here is how the spot in the final picture was removed.

(1) Things needed - Camera, air blower, enough light to look at the sensor/filter area.
(2) Better to have a fully charged battery.
(3) Remove the lens from the camera body.
(4) Turn the camera on and from the setup menu set the "Mirror lock-up" option to "On".
(5) Set the camera mode to manual.
(6) Change the shutter speed till you reach the "Bulb" mode.
(7) Now press the shutter button and keep it pressed.
(8) The mirror will give way to the sensor/filter area.
(9) Look at the sensor/filter surface. In my case I could clearly see a speck of dust in the center of the surface.
(10) Use the air blower and blow air on the sensor/filter area while holding the camera upside down (so that dust can easily fall vertically down).
(11) Release the shutter button.
(12) Switch the camera off.
(13) Put back the lens, take some pictures and see if it helped.

Happy clicking.