Basic Water physics - Optical behavior


Reflection is the phenomena when the wave front changes direction at an interface between two different media, in the way that the wave front returns into the medium from which it originated. In some aspects the surface of the water acts like a perfect mirror. Electromagnetic waves of light are reflected on the surface. The physical law for this: the angle of reflection equals the angle of incidence, and we measure these angles to the normal-vector of the surface, namely the two angles α and β are equal:


Taking into consideration only the reflection behavior of the water it is easy to calculate the color of the pixels on the water surface. Mirroring the position of the camera to the plane of the surface gives the exact location of the virtual view: just determine which color has the object which is visible through every pixel of the water from the virtual view. This idea is shown on the next figure:


If the camera is in point A, the perceived color on the water surface will be the color of the object visible from point B through the same intersection point. Point B is exactly the same far from the plane of the water as point A - the two distances are marked with letter "k" on the figure.


The speed of electromagnetic waves is different in different media. The change happening when it passes from one medium to another causes the phenomenon of refraction. The Snell's law (named after the Dutch mathematician Willebrord Snellius) describes the relationship between the angle of incidence and refraction: the ratio between them is a constant depending on the media or more exactly the ratio of the sines of the angles equals the ratio of velocities in the two media:




These angles are measured in respect to the normal-vector of the boundary between the two media.

According to this law the direction of the wave can be refracted towards or from the normal line, depending on the relative refraction-indices of the media. The next figure shows an example:


In this case the velocity is lower in the second medium (V2<V1), the ray in the second medium is closer to the normal-line.

The index of refraction for air is 1, for water is 4/3.

The third dimension

The previously discussed examples and definitions were only two-dimensional, but for the real world, everything needs to be formed into 3D. The following equations describe the direction after refraction in 3D. For explanation, see [1]. Let s be the incoming ray of light (vector), t the transformed ray of light, n the normal-vector of the surface, η1 and η2 are the velocity indices. The transformed vector has two components: one parallel and one perpendicular to n. This can be written in the following form:

t = -n cos(θ2) + m sin(θ2)

, where the underscored elements are vectors.

To calculate the two coefficients, we need to use the fact that only the angle along the surface changes, and not the entire direction. m can be defined as follows:

m = perpns / sin(θ1) = s - (ns) n / sin(θ1)

Using the previous equations [1] described the following result:

\begin{align} \underline{t} = -\underline{n} \left( \sqrt{1- \frac{\eta _{1}^{2}}{\eta_{2}^{2}}(1-(\underline{n}\cdot \underline{s})^{2}) } + \frac{\eta _{1}}{\eta_{2}} (\underline{n}\cdot \underline{s}) \right) - \underline{s}\frac{\eta _{1}}{\eta_{2}} \end{align}

This equation contains the possibility to have negative square root, which means that the equation is not defined for every angles and coefficients. The physical reason for this is described in the following paragraph.

Critical angle

There is one more important phenomenon that I need to mention in connection with refraction. If the light is coming from a media with lower velocity, the angle will change from the normal, so the angle between the normal and the beam will be bigger in the target media. This means that to get 90 degree in the target medium a smaller angle is enough in the source medium. This specific angle is called critical angle. The critical and any higher angle results a refraction vector which is parallel to the surface of the media. If this happens, the wave will be refracted along the border of the media, it will not intrude the target medium, the so-called total internal reflection will occur. This critical angle is about 50 degree at a water-air boundary.


The sources of these illustrative images are Wikipedia and
There is a funny flash application to play with the reflective-refractive angles and media on this site:

Multiple reflection and refraction

The light beams are reflected and refracted on the surface of the water, but to a certain amount the transformed light beams meat the air-water border again and reflection and refraction happens newly. This is illustrated on the next figure:


The source of the image is [2].

The reflection-refraction ratio: the Fresnel term

The first two sections described reflection and refraction. They both happen to electromagnetic waves on the border of different media like on the next figures:


But how to get the accurate ratio between reflection and refraction? Augustin-Jean Fresnel (/freɪˈnɛl/) worked out the laws of optics in the early 19th century. His equations give the degree of reflectance and transmittance at the border of two media with different density. Derivation of them is outside the scope of this paper.
The wave has two components: a parallel and a perpendicular. Ei is the amplitude of the incident wave, Er and Et are the amplitudes of the reflected and the transmitted wave. θi, θr,, and θt,, are the angles between the surface normal and the beam of incidence, refraction and transmittance.

\begin{equation} r = E_{r}/E_{i} \end{equation}
\begin{equation} t = E_{t}/E_{i} \end{equation}

For the perpendicular component the equations are the following:

\begin{align} r = \frac{n_{i}cos(\theta _{i}) - n_{t}cos(\theta _{t})}{n_{i}cos(\theta _{i}) + n_{t}cos(\theta _{t})} \end{align}
\begin{align} t = \frac{2 *n_{i}cos(\theta _{i})}{n_{i}cos(\theta _{i}) + n_{t}cos(\theta _{t})} \end{align}

The next equations are showing the properties of the parallel components:

\begin{align} r = \frac{n_{i}cos(\theta _{i} - n_{t}cos(\theta _{i})}{n_{i}cos(\theta _{t}) + n_{t}cos(\theta _{i})} \end{align}

t = [2nicos(θi)]/[nicos(θt) + ntcos(θi)]

The more elegant version of them are:

rperpendicular = −[sin(θi)−sin(θt)]/[sin(θi)+sin(θt)]


rparallel =[tan(θi)−tan(θt)]/[tan(θi)+tan(θt)]

If the light is polarized to have only perpendicular component, we call it S-polarized. Similarly, if it has only parallel components, it is called P-polarized. The next figure shows example coefficients depending on the angles for both S and P polarized cases:


As visible on the figure, in case of moving from denser medium to a less dense one (on the right), the reflection coefficient is 1 above the critical angle. This phenomenon is known as total internal reflection, as metioned earlier.

Specular lights

Materials having a flat surface (e.g.: leather, glass and water also) present an interesting phenomenon which I have not mentioned yet. There are several different reflection models, some of them make the created image much more realistic while others help to improve the smaller details. One of these in the second group is specular reflection.

Materials like sand have irregular, bumpy surface and this makes incoming light to be reflected in every directions. This is shown on the next figure:


But if the material has flat surface, the light waves will be parallel after reflection as well. Because of this property shiny, bright spots will be formed on different materials, for example, on leather, metals, or on water if they are illuminated from a certain angle. The Phong illumination model describes this in the way which is most commonly used in 3D computer graphics. Phong Bui Tong developed his model in 1975 and it is still very popular. According to this model the intensity of point has three components: an ambient, a diffuse and a specular component and the specular highlight is seen when the viewer is close to the direction of reflection. The intensity of this kind of light falls off sharply when the viewer moves away from the direction of specular reflection.


Vector L points towards the light-source, V towards the viewer, N is the normal-vector of the surface, R is the direction of reflection while H halves the angle between L and V.
The approximation of the falloff of the intensity in the Phong model uses the power of the cosine of the angle. The specular part of the original formula looks like this:

\begin{align} k_{spec} \times cos^{n}(\beta ) \end{align}

where β is the angle between R and V; kspec is the specular coefficient. The exponent n can influence the sharpness of the falloff. A bigger exponent can describe a shinier surface with less gentle falloff. The dot product of two vectors equals the cosine of the angle between them, so the formula can be written in the following form:

\begin{align} k_{spec} \times ( V \cdot N )^{n} \end{align}

Where "·" is the dot product.

With the diffuse reflection model the Phong illumination model is the following (I means intensity):

\begin{align} I = k_{ambient} \times I_{ambient} + (\frac{I_{p}}{d}) \left[ k_{diffuse} \times (N\cdot L) + k_{specular} \times (V \cdot N)^{n}\right] \end{align}

Where Is are the different intensities, ks are the ambient, diffuse and specular coefficients, and · is the dot product. Namely, the intensity of a point is equal to the sum of the ambient light-intensity and the sum of the diffuse and specular intensity scaled to the distance of the light-source.

1. Mathematics for Game Developers – Christopher Tremblay – Thomson course technology.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License