|
|
How a rainbow is formed. (A Java(TM) experiment.)david.detlefs@sun.comI was first told how a rainbow works in second-term college physics. The explanation mostly served to exercise some things we had just learned: Snell's law, total internal reflection, etc. That explanation showed that any light ray from the sun that refracts once on entry, reflects once internally, and then refracts on exit coming back to towards a viewer makes an angle of at most 42 degrees with the path from the sun to the droplet. I have seen this explanation in several places, including the excellent book Rainbows, Halos, and Glories, by ???, but it has always left me somewhat unsatisfied, since it does not by itself explain the presence of the rainbow. An explanation of the rainbow has two parts:
My little demo here demonstrates that the angular distribution not only has a maximum value, but it is strongly skewed toward that maximum. By clicking below the black bar that delimits the left-side radial displacements into the blue water droplet, you send a ray into the droplet and see it come out. It gets added to the output angle histogram. You can randomly choose radial offsets and let it run awhile. Or you can run 1000 fast without animating them, to see the final shape of the histogram (1000 seems to do fine.) We see no that the existence of the bright spot is because the distribution peaks sharply at about 42 degrees. Even if the distribution tailed on to 90 degrees, we would still get a rainbow. Extensions one could doHaving answered question 1, we could also answer question 2, by randomly choosing a color for the ray and varying the effective index of refraction of the water droplet accordingly. Visually, we could show the rainbow as it builds up.Other rainbow sitesJava is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries. |