Skip to content

TimeLooop/Model-Rainbow

Repository files navigation

Model-Rainbow

Simulation of rainbow on a spherical drop of water.

The phenomenon of the rainbow is already a fairly well-studied process. The aim of the work was mathematical modeling of this process using animated visualization. The vector law of refraction and vector geometry were used in the work. The calculations were made by searching for the coordinates of the points through which the scattered beam of light passes. The model is implemented using the C++ programming language. By solving the Snell equations in vector form, the trajectories of monochromatic and non-monochromatic light scattered on a spherical water drop were obtained. Visualization is implemented through the user interface package "Windows Forms". The program calculates ray trajectories with great accuracy and can be used for graphics or be the basis for more complex models