// Exemplo de arquivo de descricao de cena para POV-ray
// Last edited on 2010-03-04 15:44:01 by stolfi

// ======================================================================
// CORES E TEXTURAS

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

#declare tx_plastico = 
  texture{
    pigment{ color rgb < 0.10, 0.80, 1.00 > }
    finish{ diffuse 0.9 ambient 0.4 specular 0.5 roughness 0.505 }
  }

#declare tx_fosca = 
  texture{
    pigment{ color rgb < 1.00, 0.80, 0.10 > }
    finish{ diffuse 0.8 ambient 0.4 }
  }

#declare tx_farol = 
  texture{
    pigment{ color rgb < 1.00, 0.90, 0.10 > }
    finish{ diffuse 0.9 ambient 0.8 }
  }

#declare tx_espelho = 
  texture{
    pigment{ color rgb < 1.00, 0.85, 0.30 > }
    finish{ diffuse 0.2 reflection 0.9*< 1.00, 0.85, 0.30 > ambient 0.1 }
  }

#declare tx_vidro = 
  texture{
    pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 }
    finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 }
  }


// ======================================================================
// DESCRIÇÃO DA CENA 


// Partes da cena:
#declare traseira = 
  sphere{ < -3,0,0 >, 2.0 }

#declare frente = 
  sphere{ < 3,0,0 >, 2.0 }
  
#declare corpo =
  cylinder{ <-3,0,0 >, <3,0,0>, 2.0}

#declare roda =
  sphere{ <0,0,0>, 1.0}

#declare centro_roda =
  cylinder{ <0,10,0>, <0,-10,0>, 0.4}

#declare luz =
  cone{ <4,0,0>,1.8,<0,0,0>,0.2}

#declare farol =
  sphere{ <0,0,0>, 0.3}

#include "eixos.inc"

// Aqui está a cena, finalmente:

union{
  object{ eixos(3.00) }

  object{ corpo texture{tx_plastico} }
  object{ frente texture{tx_plastico} }
  object{ traseira texture{tx_plastico} }


  object{ difference{
    object{ roda } 
    object{ centro_roda }
    }
    translate< 2,2.5,-1.3>
    texture{tx_fosca}
	}

object{ difference{
    object{ roda } 
    object{ centro_roda }
    }
    translate< 2,-2.5,-1.3>
texture{tx_fosca}
	}

object{ difference{
    object{ roda } 
    object{ centro_roda }
    }
    translate< -2,2.5,-1.3>
texture{tx_fosca}
	}

object{ difference{
    object{ roda } 
    object{ centro_roda }
    }
    translate< -2,-2.5,-1.3>
texture{tx_fosca}
	}
  
object{luz translate<4.5,0.9,-0.7> texture{tx_vidro}}
object{luz translate<4.5,-0.9,-0.7> texture{tx_vidro}}

object{farol translate<4.8,0.76,-0.58> texture{tx_farol}}
object{farol translate<4.8,-0.76,-0.58> texture{tx_farol}}

}

#include "camlight.inc"
#declare centro_cena = < 0.00, 0.00, 0.00 >;
#declare raio_cena = 18.0;
#declare dir_camera = < 10.00, 10.00, 0.00 >;
#declare dist_camera = 16.0;
#declare intens_luz = 1.00;
camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)