#version unofficial megapov .5; #macro Lum( col ) col.x*.3+ col.y*.59+ col.z*.11 #end #macro country_grass( GV1, GV2 , Gscale, GtexScale, Gnum, Grange, Grotate ) #$ Ro=20; #$ Gnorm= function{ pigment{gradient y scale .3 translate y*-.025 scallop_wave color_map{[0 rgb 0][1 rgb .25]}} } #$ Gtex=pigment{spherical scale<.075,1,.1> color_map{[0 rgb<.1 .8 .25>][.3 rgb<.1 1 .25>*.5]}} #$ Gfinish=finish{diffuse.9 specular .3 roughness .1} #$ Blade= union{ union{ union{ triangle{x*-.05,x*.05,y*.25 pigment{Gtex translate y*-.75}finish{Gfinish} normal{function Gnorm} rotate x*Ro translate y*.25 } box{<-.05,0,0>,<.05,.25,0> pigment{Gtex translate y*-.5}finish{Gfinish}normal{function Gnorm}} rotate x*Ro translate y*.25 } box{<-.05,0,0>,<.05,.25,0> pigment{Gtex translate y*-.25}finish{Gfinish} normal{function Gnorm}} rotate x*Ro translate y*.25 } box{<-.05,0,0>,<.05,.25,0> pigment{Gtex}finish{Gfinish} normal{function Gnorm}} //pigment{rgb<.3 .9 .45>}finish{diffuse .9 specular .3 roughness .1} } #$ Tex=pigment{bumps scale GtexScale color_map{[0 rgb 0][1 rgb 1]}} #$ X=0; #$ Z=0; #$ R=seed(34959); #$ V=0; #$ GW = GV1.x-GV2.x; #$ GD = GV1.y-GV2.y; union{ #while(V ); #$ Cv=Lum(Cf); #object{Blade scale 1+rand(R) scale<1,1,.5+rand(R)> scale Gscale rotate y*Cv*Grange*2 rotate y*-(Grange) rotate y*Grotate+(rand(R)*8-4) translate } #$ V=V+1; #end translate } #end