//this file is for an animation of an atom floating over water with trigonometric //scaling and translation for a continuous looping animation #include "colors.inc" #include "textures.inc" #include "atom.inc" #declare pi=3.141592654 #declare X=clock*(pi/180) #include "trig.inc" #declare Cam_Y=2.5*sinx #declare Cam_X=10*sinx #declare Cam_Z=10*cosx #declare Scale=.5*sinx+1.2 #declare Y_Rotation=-clock #declare Ripple_Phase=clock/360 #declare Turbulence=.5+.1*sinx #declare Cloud_XRotation=clock camera { location direction z right 1.33*x up y look_at 0*x } light_source {<-10,10,-10> color White} //water plane plane { y, -5.0 texture { pigment {color CoolCopper} normal {ripples .3 scale .5 phase Ripple_Phase} finish{ reflection .3 diffuse .3} } } //sky sphere sphere { 0*x, 10000 texture { Blood_Sky turbulence Turbulence scale 4000 translate z*20*Ripple_Phase finish {ambient 1} } rotate x*Cloud_XRotation } //the atom object { atom texture { Sapphire_Agate scale .1 finish {phong .3 ambient .5}} scale Scale rotate y*Y_Rotation }