// Entry code: thbqad // Name : Peterson Trethewey // Frame rate: 25 global_settings{ photons{count 1e6} } camera{ location (x+y-z)/2 look_at y/5 } light_source{ <.5,.9,0>.5 //By using corner brackets I saved one whitespace character } difference{ box{-z 1inverse} //the box is inverse because the camera is going to be on the inside, this wouldn't be necessary except we're subtracting a sphere sphere{.4*y.03} //the water needs to look like its coming out of a hole in the wall, a sphere is fewer characters than a cylinder, and this way, it kind of looks like a hole with a beveled edge pigment{rgb<1.1,1,1>} //Almost anything is more interesting than true white. normal{agate scale.01} //simple stone texture for the walls. } #macro F() //This stuff goes in both components of the water, so it's a macro. pigment{rgbf 1} finish{ ior 1.3 reflection{0,1} } photons{target reflection 1refraction 1}} //reflection and refraction cost a lot of characters but I found it essential to have them both. //That last '}' is a trick I borrowed from one of the previous year's best entries to save another character #end //This is the function for the wave form. It's essentially a sin function of the distance to the //the origin divided by the distance squared to make it dissipate. I massaged coefficients //until it looked reasonable. //A multiple of the clock is added to the argument of sin so that the wave propagates. //As the clock goes from 0 to 1, it makes just under a full cycle, so the movie can loop //without the first and last frames being exactly the same. That's why that coeficient is 13.86, not 14. #local p=function{.1+sin(90*sqrt(x*x+z*z)-13.86*pi*clock)/(4+40*(x*x+z*z))/100} merge{ //the stream and the body of water are merged together. //the body of water: isosurface{ function{(y-p(x-.172,y,z)-p(x+.172,y,z))}} //the wave function is translated to the point where the stream hits the water. //A copy of the wave form is added centered at the mirror image beyond the back wall. This creates the illusion //that the waves are bouncing off the wall. //the stream of water: torus{.4 .02 //Surprise! The path the stream takes is actually elliptical. rotate x*90 scale x/2 //Scaling in the x direction makes the stream narrower toward the bottom. normal{ //The bump map rotates around the origin before the torus gets scaled, so bumps toward the bottom of the stream move faster (like they should) bumps scale.01 rotate -clock*z*356.4 //Again, for the movie to loop, the torus has to make just under a full turn as the clock goes from 0 to 1 scale x/2 } F() F()