//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 "molecule.inc" #declare pi=3.141592654 #declare X=clock*pi/180 #include "trig.inc" //height will oscillate between -2.5 and 2.5 #declare Cam_Y=2.5*sinx //x and z positions will move around a circle of radius 10 #declare Cam_X=10*sinx #declare Cam_Z=10*cosx //the size of the object will oscillate between 75% and 125% #declare Scale=.25*sinx+1 //it will rotate along the y axis opposite the motion of the camera #declare Y_Rotation=-clock //the phase will move once per cycle #declare Ripple_Phase=clock/360 //turbulence will oscillate between .4 and .6 #declare Turbulence=.5+.1*sinx //the clouds will advance rapidly, once per cycle #declare Cloud_XRotation=clock //will move in a circle around the object camera { location direction z*1.5 right 1.33*x up y look_at 0*x } light_source {<-2, 40, -20> color White} //water plane plane { y, -5.0 texture { pigment {color SeaGreen} normal {ripples .45 phase Ripple_Phase} finish{ reflection .3 diffuse .3} } } //sky sphere sphere { <0,0,0>, 10000 texture { Bright_Blue_Sky turbulence Turbulence scale 4000 translate z*20*Ripple_Phase finish {ambient 1} } rotate x*Cloud_XRotation } //the weird object object { molecule texture { Jade finish {phong .3 ambient .3 diffuse .7}} translate <-15, -15, -15> scale 1/3 scale Scale rotate y*Y_Rotation }