// Last edited on DATE TIME by USER
// Processed by remove-cam-lights

background{ color rgb < 0.75, 0.80, 0.85 > }

#declare tinta_A =
  texture {
    pigment { color rgb < 0.10, 0.80, 1.00 > }
    finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 }
  }

#declare tinta_C =
  texture {
    pigment { color rgb < 2, 0.5, 0.5 > }
    finish { diffuse 0.8 specular 0.2 roughness 0.005 ambient 0.1 }
  }

#declare copa1 =
 sphere{<0,-1.5,0>,1 texture{tinta_C}}

#declare copa2 =
 sphere{<0,1.5,0>,1 texture{tinta_C}}

#declare tronco =
 cylinder{<0,0,0>,<0,0,-6>,0.5 texture{tinta_A}}

#declare arv =
 union{object{copa1}
  object{copa2}
  object{tronco}
 }

#macro arvore(n)
 #if(n=1)
  object{arv}
 #end
 #if(n > 1)
  union{
   object{arv translate<0,1.5*n-1.5,6*n-6> rotate 15*y}
   object{arv translate<0,1.5*n-1.5,6*n-6> rotate -15*y}
   object{arv translate<0,-1.5*n+1.5,6*n-6> rotate -15*y}
   object{arv translate<0,-1.5*n+1.5,6*n-6> rotate 15*y}
  }

 arvore(n-1)
 #end
#end

arvore(9)

#include "camlight.inc"
camlight(<0,0,0>,<100,60,10>,1.00,z,1.0)