// Exercicio de ComputaƧao Grafica - Stolfi
// Solange Tieko Sakaguti - ra007847 - 23/06/2001
// Last edited on 2001-07-30 10:18:01 by stolfi

#include "colors.inc"

background {Gray}

light_source { <24,44,30> White}

camera {
  location  <20,30,50>
  right     <-0.8, 00.0, 00.0>
  up        <00.0, 00.0, +0.6>
  sky       <0,1,0>
  look_at   <2.5,-2,0>
} 


#declare pilha_bolacha = object {
  union{
    torus {2,.4 translate <-8,-12,0>} 
    torus {2,.4 translate <-8,-11,0>}	
    torus {2,.4 translate <-8,-10,0>} 
    torus {2,.4 translate <-8,-9,0>}	
    torus {2,.4 translate <-8,-8,0>} 
    torus {2,.4 translate <-8,-7,0>}	
    torus {2,.4 translate <-8,-6,0>} 
    torus {2,.4 translate <-8,-5,0>}	
    torus {2,.4 translate <-8,-4,0>} 
    torus {2,.4 translate <-8,-3,0>}	
    torus {2,.4 translate <-8,-2,0>} 
    torus {2,.4 translate <-8,-1,0>}	
    torus {2,.4 translate <-8,0,0>} 
    torus {2,.4 translate <-8,1,0>}	
    torus {2,.4 translate <-8,2,0>} 
    torus {2,.4 translate <-8,3,0>}	
    torus {2,.4 translate <-8,4,0>} 
    torus {2,.4 translate <-8,5,0>}	
    torus {2,.4 translate <-8,6,0>} 
    torus {2,.4 translate <-8,7,0>}	
    torus {2,.4 translate <-8,8,0>} 
    torus {2,.4 translate <-8,9,0>}	
    torus {2,.4 translate <-8,10,0>} 
    torus {2,.4 translate <-8,11,0>}	
    pigment {Brown}
  }
}

#declare LightBlue = color rgb <0.5, 0.5, 1.0>;

#declare i = 15;
#while (i>0)
  box {<5,-10,-15>, <-5,-8,-10> translate <0,1*i,1*i> pigment {LightBlue} rotate -90*y}
  #declare i=i-1;
#end


#declare move_bolacha = object {
    torus {2,.4 translate <10+(clock*-3),(clock*-3),0> rotate 90*z} 
    pigment {Brown}
}


#declare texto =
    text {ttf "gothic.ttf" "Coma Bolachas Povvy Super-Vitaminado" 4, 0
    // pigment {Black}
    pigment{White}
    translate <-7,-15,4>
  }

object {pilha_bolacha}
object {move_bolacha}
object {texto}