// MP004 - COMPUTACAO GRAFICA
// NOME: LUCIANA RAMOS
// RA: 007868
// Last edited on 2001-07-30 20:39:29 by stolfi


// TRABALHO DE LABORATORIO 6
// NOVA EMBALAGEM


#include "colors.inc"

background{ color rgb < 1.00, 0.80, 0.50 > }

light_source {
  < -10.00, 40.00, 80.00 >
  color rgb 1.25*< 1.00, 1.00, 1.00 >
} 

camera {
  location  <  0.00, 1.00, 8.00 >
  look_at   <  0.00, 0.00, 0.00 >
} 



#declare x1 = 
  cylinder {
    < +100.00, 0.00, 0.00 >,
    < -100.00, 0.00, 0.00 >,
    0.01
    texture {
      pigment { color rgb < 1.00, 0.00, 0.00 > }
    }
  }

#declare y1 = 
  cylinder {
    < +0.00, 100.00, 0.00 >,
    < 0.00, -100.00, 0.00 >,
    0.01
    texture {
      pigment { color rgb < 0.00, 1.00, 0.00 > }
    }

  }

#declare z1 = 
  cylinder {
    < 0.00, 0.00, 2.00 >,
    < 0.00, 0.00, -2.00 >,
    0.01
    texture {
      pigment { color rgb < 0.00, 0.00, 1.00 > }
    }

  }
  


#declare copo = 
  cone {
    < 0.00, 2.00, 0.00 >, 1
    < 0.00, 0.00, 0.00 >, 0

    texture {
      pigment { color rgb < 1.00, 0.50, 0.00 > }
    }
  }

#declare esfera =
sphere { <3,0,0>, 0.5
    texture {
//      pigment { color rgb < 1.00*clock - 1, 0.50*clock + 0.5, clock > }
        pigment { color rgb < 1- clock, clock, 0 > }
    }

 
}

#declare rotulo1 = 
text { 
	ttf "latinwd.ttf"
	"Gira"
	0.15, 0
} 

#declare rotulo2 = 
text { 
	ttf "arial.ttf"
	"Coca"
	0.15, 0
} 

#declare rotulo3 = 
text { 
	ttf "bookos.ttf"
	"Coca"
	0.30, 0
} 

#declare rotulo4 = 
text { 
	ttf "britanic.ttf"
	"Gira"
	0.15, 0
} 

#declare rotulo5 = 
text { 
	ttf "alger.ttf"
	"Gira Coca"
	0.15, 0
} 

#declare rotulo6 = 
text { 
	ttf "latinwd.ttf"
	"Girou!!"
	0.15, 0
} 

#declare var = 0*(1-clock) + 1*clock


// Aqui está a cena, finalmente:

union{

/*
   object{ x1 }
   object{ y1 }
   object{ z1 }
*/
   object {copo}


   object {esfera
     rotate<0,0,clock*270>   
   }
 
   #if ((clock >= 0) & (clock < 0.2))
   object {rotulo1
     translate <-2,3,0>
     rotate<0,180,0>}
   #end

   #if ((clock >= 0.2) & (clock < 0.4))
   object {rotulo2
     translate <-1,3,0>
     rotate<0,180,0>}
   #end

   #if ((clock >= 0.4)  & (clock < 0.6))
   object {rotulo3
     translate <-1,3,0>
     rotate<0,180,0>}
   #end

   #if ((clock >= 0.6)  & (clock < 0.8))
   object {rotulo4
     translate <-1,3,0>
     rotate<0,180,0>}
   #end


   #if ((clock >= 0.8)  & (clock < 1.0))
   object {rotulo5
     translate <-2.5,3,0>
     rotate<0,180,0>}
   #end


   #if (clock = 1.0)
   object {rotulo6
     translate <-2.5,3,0>
     rotate<0,180,0>}
   #end


plane {<0,1,0>,-6 
       pigment { checker color <1,0,0>, color <0, 1, 0>}
} 

}