// Last edited on 2007-04-01 12:07:56 by stolfi

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


// Cores:

#declare amarelo = 
  texture {
    pigment { color rgb < 1.00, 1.00, 0.00 > }
    finish { diffuse 0.8 specular 0.3 roughness 0.005 ambient 0.2 }
  }

#declare vermelho = 
  texture {
    pigment { color rgb < 0.90, 0.00, 0.00 > }
    finish { diffuse 0.8 specular 0.3 roughness 0.005 ambient 0.2 }
  }
  
#declare azul = 
  texture {
    pigment { color rgb < 0.00, 0.20, 1.00 > }
    finish { diffuse 0.8 specular 0.3 roughness 0.005 ambient 0.2 }
  }
  
#declare cinza = 
  texture {
    pigment { color rgb < 0.70, 0.70, 0.70 > }
    finish { diffuse 0.8 specular 0.3 roughness 0.005 ambient 0.2 }
  }
  

// Partes do objeto

#declare corpo = 
	box {
		< 0.0, 0.0, 0.0 >
		< 4.0, 2.0, 4.0 >
		texture { azul }
	}
	
#declare base =
	difference {
		sphere {
			< 0.00, 0.00, 2.00 >, 6.00
			texture { amarelo } 
		}		
		union {
			box {
				< -6.00, -6.00,  2.00 >
				<  6.00,  6.00,  8.00 >
				texture { amarelo } 
			}
			box {
				< -6.00, -6.00, -4.00 >
				<  6.00,  6.00,  0.00 >
				texture { amarelo } 
			}
		}
	}
	
#declare xicara =
	difference {
		cone {
			< 0.0, 0.0 , 0.0 > 1.2
			< 0.0, 0.0 , 2.0 > 1.4
			texture { vermelho }
		}
		cone {
			< 0.0, 0.0, 0.1 > 1.1
			< 0.0, 0.0, 2.1 > 1.3
			texture { vermelho }
		}	
	}
	
#declare braco =
	union {
		cylinder {
			<  0.0, 6.0, 0.0 >,
			<  0.0, 0.0, 3.0 >,
			0.2
			texture { cinza }			
		}
		cylinder {
			<  0.0,  0.0,  3.0 >,
			<  0.0,  0.0, -1.0 >,
			0.2
			texture { cinza }
		}
		sphere {
			< 0.0, 0.0, 3.0 >, 0.5
			texture { amarelo }
		}
		sphere {
			< 0.0, 6.0, 0.0 >, 0.5	
			texture { amarelo }	
		}	
	}

// Aqui está a cena, finalmente:


union
{
	object { xicara
		translate < 0.0, 0.0, 2.0 >
	}
	object { base }
	object { corpo
		translate < -2.0, 5.0, 0.0 >
	}
	object { braco
		translate < 0.0, 0.0, 4.0 >
	}
}

#include "camlight.inc"
camlight(<0,0,0>,<10.00,-5.00,7.00>,1.2,z,1.0)