Water droplets in the atmosphere refract light to form a rainbow. If you look at the top of a rainbow, the angle between your line of sight and the horizon is always the same. This angle—call it D—is...



Water droplets in the atmosphere refract light to form a rainbow. If you look at the top of a rainbow, the angle between your line of sight and the horizon is always the same. This angle—call it D—is 42 1/3 (42.333333) degrees. Imagine a vertical line from the top of the rainbow to the ground. Also imagine a horizontal line between you and the previous vertical line. The length of this horizontal line is the distance to the rainbow, and the length of the vertical line is the height of the rainbow:


The height of the rainbow is given by the following formula:


rainbowHeight = yourHeight + distanceToRainbow x tangent(D)


Because D is given in degrees, you must convert it from degrees to radians before computing the tangent of D by using the formula


radians = degrees x S / 180


Write a program to compute the height of a rainbow given your height and your distance from the rainbow.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here