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

#include "finish.inc"      
#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"
#include "metals.inc"
#include "glass.inc"
#include "woods.inc"  
#include "golds.inc"          
#include "stars.inc" 
            

       
  

#if (clock<=0.5)
#declare xyz = clock;
#end
#if (clock>0.5)
#declare xyz = 1-clock;
#end

  

  

  

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

#declare raio = 2.000;

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

#declare tinta_B = 
  texture {
    pigment { color rgb < 0.20, 0.70, 0.80 > }
    finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 }
  }
  
#declare tinta_C = 
  texture {
    pigment {
       bozo
       color_map{
               [0.3 color rgb<0.0,1.0,1.0>]
               [0.5 color rgb<1.0, 0.4,0.0>]
       }
       scale 0.8
}
    finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 }
  }

#declare tinta_V = 
  texture {
    pigment { color rgbf < 1.0, 0.0, 0.0, .8 > }
    finish { diffuse 0.8 specular 0.1 roughness 0.005 ambient 0.1 }
  }

#declare tinta_M = 
  texture {
    pigment { color rgb < 0.50, 0.30, 0.0 > }
    finish { diffuse 0.9 specular 0.2 roughness 0.005 ambient 0.1 }
  }

#declare tinta_VD = 
  texture {
    pigment { color rgb < 0.0, 0.50, 0.0 > }
    finish { diffuse 0.8 specular 0.5 roughness 0.005 ambient 0.1 }
  }

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

#declare bolha = 
blob{
  threshold 0.5
  sphere{<0,2,7>,1.5, 1.5 texture{tinta_M}}
  sphere{<0,4,7>,1.5, 3 texture{tinta_VD}}
  sphere{<0,6,7>,1.5, 2 texture{tinta_AZ}}
  sphere{<0,2,2>,5, 5 texture{tinta_M}}
  sphere{<0,6,2> 2, 3 texture{tinta_V}}
  
  #declare yy = 0.6;
  sphere{yy*<7,1,0>, 0.7, -1 translate<0,2,2>}
  sphere{yy*<7,2,1>, 0.7, -1 translate<0,2,2>}
  sphere{yy*<7,-1,0>,0.7, -1 translate<0,2,2>}
  sphere{yy*<7,-2,1>,0.7, -1 translate<0,2,2>}
  sphere{yy*<7,0,2>, 0.7, -1 translate<0,2,2>}
}

#declare boneco =
blob{
 threshold 0.5
 #declare xx = 0.4;
 sphere{xx*<0,1,0>, 0.7, 1 }
 sphere{xx*<0,2,1>, 0.7, 1 }
 sphere{xx*<0,-1,0>,0.7, 1 }
 sphere{xx*<0,-2,1>,0.7, 1 }
 sphere{xx*<0,0,2>, 0.7, 1 }
}

#declare chao = 
plane{ z,0

 texture{pigment { checker rgb<1,1,1>, rgb<0.5,0.5,0.5>}
         finish{diffuse 0.5 ambient 0.5}
        }
 scale 100
 translate -7*z 
} 

union{
  
  object{bolha texture{tinta_B}} 
  object{boneco  texture{tinta_B} translate<9,8,5>}
  
}

// Original camera parameters:
// #local cam_ctr = <0,0,0>
// #local cam_vec = (30*<1.00,1.00,1.00>)
// #local cam_sky = z

#include "camlight.inc"
camlight(<0,0,0>,<10,10,10>,20.0,z,1.0)