#include "colors.inc" #include "textures.inc" #include "metals.inc" #include "Flock.inc" #include "Fish.inc" global_settings { ambient_light rgb< 0, 0, 0 > } #macro align( Axis1, Axis2 ) #local vX1 = vnormalize( Axis1 ); #local vX2 = vnormalize( Axis2 ); #local vY = vnormalize( vcross( vX1, vX2 ) ); #local vZ1 = vnormalize( vcross( vX1, vY ) ); #local vZ2 = vnormalize( vcross( vX2, vY ) ); matrix < vX1.x, vY.x, vZ1.x, vX1.y, vY.y, vZ1.y, vX1.z, vY.z, vZ1.z, 0, 0, 0 > matrix < vX2.x, vX2.y, vX2.z, vY.x, vY.y, vY.z, vZ2.x, vZ2.y, vZ2.z, 0, 0, 0 > #end #declare f = int( frame_count * clock ); /* object { sphere{ position[f][0][0], 0.1 } pigment { Red } } */ union { #declare p = 1; #while( p < point_count ) object { fish align( x, position[f][p][1] ) translate position[f][p][0] texture { T_Chrome_4B } pigment { rgb < ( 2 * p ) / point_count, 2 - ( ( 2 * p ) / point_count ), 2 > } } #declare p = p + 1; #end } camera { location < position[f][0][0].x, 5, -20 > //location < position[f][0][0].x - 7, 30, 0 > look_at < position[f][0][0].x - 7, 0, 0 > //angle 90 } light_source { < position[f][0][0].x + 10, 100, -100 > color White } light_source { < position[f][0][0].x, -5, 0 > color White shadowless } // the surface of the water plane { -y, -40 texture { pigment { rgbf < 0.6, 0.9, 0.9, 0.9 > } normal { bumps 1 scale < 0.75, 0.25, 0.25 > scale 3 } } interior { caustics 0.1 } } // the bottom of the pool... plane { y, -10 texture { pigment { color rgb < 0.6, 0.9, 0.9 > } finish { ambient 0.1 diffuse 0.7 } scale 0.01 } } //background { White }