#include "functions.inc" #include "colors.inc" #include "math.inc" camera { location < 0, 10, -10 > look_at < 0, 0, 0 > } light_source { < 0, 10, 0 > color White } #declare n = 5; #declare fn_pattern = function( x, y, px, py ) { cos( sqrt( ( ( x - px ) * ( x - px ) ) + ( ( y - py ) * ( y - py ) ) ) * n * 4 * pi ) } #declare fn_water = function ( x, y, px, py ) { fn_pattern( x, y, px, py ) * exp( -2 - ( 10 * ( ( ( x - px ) * ( x - px ) ) + ( ( y - py ) * ( y - py ) ) ) ) ) } height_field { function 500, 500 { fn_water( x, y, 0.5, 0.5 ) * 0.3 + 0.5 } smooth pigment { Cyan } translate < -0.5, -0.5, -0.5 > scale 10 }