- Home
- Non Sequential Ray Tracing
- How to Simulate a Rainbow
- Home
- User Articles
- How to Simulate a Rainbow
How to Simulate a Rainbow
- By Shinichi NAGATA
- Published 22 June 2009
- Non Sequential Ray Tracing , User Articles
-
Rating:




INTRODUCTION
This article describes how to model a rainbow using the non-sequential capabilities of ZEMAX. Non-sequential mode has the ability to model true color sources using several source color models. You can download the associated file from the last page of this article.
This article is also available in Japanese.
Here is the simulated image of a rainbow.
In the detector image above, you can see a “primary rainbow” which is the brighter rainbow on the bottom, and a “secondary rainbow” the dimmer rainbow on the top. The darkness between these two bows is the so called the “dark Alexander’s Band”.
As you can see, the secondary rainbow is dark and its color order from red to purple is in the inverse order.
The displayed field angle is ±16 degrees horizontally and ±9 degrees vertically.
The layout for this model is below. It is set to color rays by segments; in other words, the rays are a different color after each refraction and reflection.
The parallel incidents rays are drawn in blue lines, which represent the light from the sun, and the rays refract as they enter the sphere, which represents the spherical raindrop; rays traveling inside of the raindrop are plotted with green lines. As you can see, most of the rays directly emerge from the raindrop as displayed in red lines.
However, some rays entering the upper part of the raindrop reflect at the back of the drop with a Fresnel reflection of 2%, as drawn in brown lines, and they leave the drop close to the bottom, as shown in the yellow line which refracts at the exit. This makes the primary rainbow and the brighter section under it.
In addition, there are some rays entering at the bottom part of the raindrop which reflect twice at the back of the drop. The reflected rays exit the drop on the upper part, as drawn in the purple and create the secondary rainbow and the brighter section above it. Because both of the reflections are Fresnel reflections, the secondary rainbow only has 2% of energy in comparison to the primary. There is a caustic line in the angle of the primary and secondary rainbows and hence the rainbows are in vivid color. Although there are reflected rays under the primary and above the secondary rainbows, all colors are mixed so that no individual colors can be observed. Because there are no reflected rays between the angles of the primary and the secondary rainbows, the dark band is created.