// Exemplo de arquivo de descricao de cena para POV-ray
// Last edited on 2003-07-31 12:50:37 by stolfi

// ======================================================================
// CÂMERA 
#include "textures.inc"
#include "colors.inc"    // The include files contain
#include "stones.inc"    // pre-defined scene elements
#include "metals.inc"
#include "woods.inc"
#include "finish.inc"
#include "shapes.inc"
#include "skies.inc"
#include "chars.inc"
#include "stars.inc"
camera {
 location < 5.00,5.00, 40.00 >  // Posição do observador.
  //location < 5,35,5>  //de cima
 //location <16,10,26> //de lado
 //location <-15,10,30>   //outro lado
 //location <5,5,-35> //atras
 //location <5,-30,-5> //de baixo
  //right     -1.0*x                 // Largura RELATIVA da imagem.
  //up        0.75*y                 // Altura RELATIVA da imagem.      
  sky       y                      // Qual direção é "para cima"?
  look_at   <5.00, 5, 5.00 >  // Para onde a câmera está apontando.
} 
// Nota: os parâmetros "right" e "up" devem ter a mesma proporção
// que os parâmetros ${WIDTH} e ${HEIGHT} no Makefile.

// ======================================================================
// FONTES DE LUZ

light_source {
  10 * < +50.0, +30.0, +50.0 >              // Posição da lâmpada.
  color rgb 1.2 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
} 

light_source {
  10 * < +50.0, -10.0, +10.0 >             // Posição da lâmpada.
  color rgb 0.8 * < 1.00, 1.00, 1.00 >   // Intensidade e corda luz.
} 

// ======================================================================
// DESCRIÇÃO DA CENA 
sky_sphere {S_Cloud4}

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

#declare raio = 2.000;

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

#declare tinta_B = 
  texture {
    pigment { color rgb < 1.00, 0.80, 0.10 > }
    finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 }
  }
 
#declare tinta_C = 
  texture {
    pigment { color rgb < 139,0,0> }
    finish { diffuse 0.8 specular 1 roughness 0.1 ambient 1 }
  }

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

#declare caixa_tor =
  cone{
   <2,1,1>,2.00,
   <2,6,1>,4.00
  texture {T_Chrome_1A}
  }   

#declare pescoco =
   cylinder {
      <2,6,1>,
      <2,8,1>
      0.5
      texture {T_Copper_4C}     
    }
    
#declare olhos =
   cylinder {
      <2,10,0.5>,
      <2,10,4>
      0.3
      texture {T_Chrome_4C} 
      
     
   }
    
#declare esfera =
  sphere {
      <2,10,1>,
      2.00
      texture {T_Chrome_1A}
      
   }
 
#declare esfera_eyes =
  sphere {
      <2,10,0.5>,
      0.3
      texture {tinta_C}
      
   } 

#declare chifre =
    cone {
       <2,12,1>,0.5,
       <2,18,1>,0
       texture {tinta_C}
    }     
 
#declare membro1 =
    union{
     sphere {
        <0,1,0>
	1
     }
     cylinder {
       <0,1,0>
       <0,5,0>
       0.7
      
     } 
     texture {T_Copper_4C}
  }    
#declare membro2 =
     union{
     sphere {
        <0,0.8,0>
	0.8
    
     }
     cylinder {
       <0,0.8,0>
       <0,5.8,0>
       0.5
       
    }  
    texture {T_Copper_4C}        
   }
     
#declare mao =
     union {
       cylinder{  
          <0,0,0>
          <1,0,0>
          0.5
        
       }
       difference {
          cylinder {
          <1.2,-0.5,0>
          <1.2,0.5,0>
          0.5          
           
          }
          
          cylinder {
          <1.2,-1,0>
          <1.2,1,0>
          0.09
          
            
          }
       
       
       } 
       texture {T_Gold_1A}
     
       //scale 4
     
     }  
     
#declare texto =
     text{  
        ttf "timrom.ttf" "666" 1,0
        texture {tinta_C}
     } 
    
#declare sapato =
     union {
       difference{
        cylinder {
         <0,0,0>
         <0,2,0>
         0.8
        }
        cylinder {
         <0,3,0>
         <0,-1,0>
         0.5
        }
       
       }
       box {
        <0.6,0,0.5>
        <3.0,1,-0.5>
                
       } 
       cylinder {
         <3,0,0>
         <3,1,0>
         0.5
       
       }
       
      //scale 3
      texture {T_Gold_1A}
     }    
             
#declare comp_rabo =
    union{
      sphere {
        <0,0,0>
        0.6    
      }
      cylinder {
        <0.3,0,0>
        <3.3,0,0>
        0.5
      } 
      rotate y*90
      texture {tinta_C}
    }
#declare fim_rabo =
     cone {
        <0,0,0> 0.7
        <0,3,0> 0
        texture {tinta_C}
        rotate x*-135
     }
        
#declare rabo =
    union {
      object {comp_rabo rotate x*45}
      object {comp_rabo rotate x*-45 translate <0,2.5,-2>} 
      object {comp_rabo rotate x*-45 translate <0,0,-4.5>}
      object {comp_rabo rotate x*45 translate <0,-2.5,-7>}
      object {comp_rabo rotate x*-45 translate <0,-0,-9.5>}
      object {fim_rabo  translate <0,-2,-11.5>}
      scale 0.78    
    
    }
        
        
#declare corpo =
    union{
      object {caixa_tor}
      object {membro1 rotate x*180 translate <4,1,1>}
      object {membro1 rotate x*180 translate <0,1,1>}
      object {membro2 rotate x*180 translate <0,-3.8,1>}
      object {membro2 rotate x*180 translate <4,-3.8,1>}
      object {membro1 rotate x*150 translate <-2,6,1>}
      object {membro1 rotate x*120 translate <6,6,1>}
      object {membro2 rotate x*120 translate <-2,2.2,3.1>}
      object {membro2 rotate x*90 translate <6,3.6,5.0>}
      object {mao rotate y*270 translate <6,3.6,10>}
      object {mao rotate y*270 rotate x*30 translate <-2,-0.64,8>} 
      object {sapato rotate y*-90 translate <0,-9.6,1>}
      object {sapato rotate y*-90 translate <4,-9.6,1>}
      object {rabo translate <2,1.5,-1>}
    }   
     
#declare cabeca =
  difference{
     union {
       object {esfera}
       object {chifre translate <-2,-12,-1> rotate z*30 translate <2,12,1> translate <-1,-1,0>}
       object {chifre translate <-2,-12,-1> rotate z*-30 translate <2,12,1> translate <1,-1,0>}
       
     }  
     object {olhos translate <-2,-10,-0.7> scale x*2.2 rotate z*45 scale y*1.3 translate <2,10,0.7> translate <1,0,0>}
     object {olhos translate <-2,-10,-0.7> scale x*2.2 rotate z*-45 scale y*1.3 translate <2,10,0.7> translate <-1,0,0>}                       
     //object {esfera_eyes translate  <1,0,0>}
     //object {esfera_eyes translate  <-1,0,0>}
     
     object {olhos translate <-0.3,-1.3,0>}
     object {olhos translate <0,-1.3,0>}
     object {olhos translate <0.3,-1.3,0>}
          
  }   
      

      
      
#declare cil1 =
    cylinder {
       <0,0,0>
       <0,24,0>
       0.5
       pigment {P_Copper4}
    }
    
#declare cil2 =
    cylinder {
       <-3,24,0>
       <3,24,0>
       0.5    
       pigment {P_Copper4}
    }

#declare pontas =
    union {
      sphere {
        <0,24,0>
        1.0     
        
      }
       cylinder {
         <0,24,0>
         <0,27,0>
         0.5
       }
        
       cone { 
         <0,27,0> 0.5
         <0,30,0> 0
         
       }
       pigment{P_Copper4  }
    }

#declare tridente =
    union {
    
        object {cil1}
        object {cil2}
        object {pontas}
        object {pontas translate <-3,0,0>}
        object {pontas translate <3,0,0>} 
        scale 0.3 
        rotate x*20
        //rotate y*15
        translate <6,1,10>  
       
    }  
      
#declare capetinha =
     union {
        object {corpo}
        object {pescoco}
        object {cabeca} 
        object {tridente}
     
     
     }   
     
#declare piso1 =
  plane {
    <0,1,0>, -10
    texture {T_Stone18 scale 5}
    
  
  } 
           
object {piso1}

object {capetinha scale 1}
// Aqui está a cena, finalmente: