This is a solution
32 on the hard interview questions node
. If you have not read the question
, the follow
ing will make no sense
Well, you can do it with two cameras:
If you fix the two cameras on two points on the disc right next to each other (but at the same distance from the center of the disc), then as the disc spins, one camera will observe the color changing just before the other. From this you can easily deduce which direction the disc is spinning.
But, you really only need one camera:
Start by fixing the camera on any point on the disc. As the disc spins, the camera will observe the color alternating between black and white. Now, move the camera around to allow the point the camera is observing to move clockwise with respect to the center of the disc, and note the rate the color changes. Move the camera in the other direction, and again note the rate the color changes. The slower rate indicates the direction the disc is spinning.