Povray/Waves
Brief
This include file simulates water waves in a very simple model. The mathematical background is described in a external linkpaper on visualizing water surfaces (German) by Bertram Walter. A different implementation with some description can be found in an article of external linkPC Magazin, issue 12/2001.
The model leads to fairly realistic results under certain circumstances:
- the water surface is infinitely large, without rims
- the water is very deep
- there is no splashing
The main idea is superposing a lot of sine waves with different frequencies, amplitudes and directions according to certain distribution functions.
The include file contains a macro that generates a user defined function. This can be used in a height_field, normal statement and isosurface, but the latter can be extremely slow since the function is quite long. By making the third parameter dependant on clock it can be used in animations.
Syntax is the following:
function {
Waves(Wind_Direction, Wind_Speed, Time, Scale)
}
The parameters:
- Wind_Direction: main wind direction (radians)
- Wind_Speed: wind speed (mainly influencing the frequency distribution)
- Time: time control for animation
- Scale: total scaling factor