//cornfield in a storm //use these AA settings when rendering: +a.004 +r5 +j0 //camera, so this expanded version can be used with non 4:3 versions camera { right x*image_width/image_height up y direction z*1 } //--- //light fairly dark to relatively increase ambient, from an angle slightly behind the grass //to give more definition (so each blade has light & dark on it) light_source { 99, rgb .5 } //sky //a planar pattern, which normally looks like a light band across the horizon, but with //turbulence it jumps up and distorts to look more like light shining between clouds. //lambda 3 gives a slightly lumpier look to the pattern, making it a bit more cloud-like sky_sphere{ pigment{ planar turbulence.5 lambda 3 } } //"random" function - turbulence scaled to give blades of grass smoothly varying psuedo-random positions with a nice organic feel //the effect of this is that blades near to one another are perturbed similarly, but over longer distances the shape can become interesting and lumpy #macro R(V) vturbulence(2,.5,6,V/9)*24 #end #local i=0; #while ( i<16384 ) //compute a base point on a grid, the grid is diagonally arranged in front of the camera, to fill our view as best as possible. #local p = mod(i,128)*(z-x) + (z+x)*i/128; //now p points are an equally spaced grid on flat ground //perturb the ground, using the turbulence function scaled up by 9. #local p = p + R(p/9); //now p points are more like random points over bumpy ground cone { //Base, offset downwards to give height and a little to the left and back to suggest prevailing wind //offsetting the base downwards rather than the tip upwards means the camera isn't buried in the grass p-18*y-7,.5, //Tip, offset by another higher-frequency pseudo random amount p+R(p),0 pigment { //pale yellow, <3,2.83,2> rgb 3-y/6-z } } #local i=i+1; #end