//Leandro Brioschi de Oliveira
//MC 930 07-11-2000 Exercicio  Pov_Ray - Professor Stolfi 

#include "colors.inc"

camera {
    location <36, 15, -35>
    look_at <15, 5, 5>
    angle 40
  }
background { color Yellow }  //to make the patch easier to see
light_source { <30, 12, -70> White }
  plane { y, -12
    texture {
      pigment {
        checker
        color Green
        color Yellow
      }
    }
  }

#declare TeePeeTex = texture {
   pigment { Gold }
     finish {
        ambient .1
        diffuse .1
        specular 1
        roughness .001
        reflection .75
        metallic
     }
  }


#declare carroceria  = 
    bicubic_patch {
    type 1 flatness 0.0100 u_steps 4 v_steps 4,
    <1.5 , 1.5, 0>,
    <7.5, 3, 0>,
    <9, 7.5, 0>,
    <15 , 8, 0>,
    <1.5 , 1.5, 3>,
    <7.5, 3, 3>,
    <9, 7.5, 3>,
    <15 , 8, 3>,
    <1.5 , 1.5, 6>,
    <7.5, 3, 6>,
    <9, 7.5, 6>,
    <15 , 8, 6>,
    <1.5 , 1.5, 9>,
    <7.5, 3, 9>,
    <9, 7.5, 9>,
    <15 , 8, 9>
    texture {
      TeePeeTex
    }
   }

  #declare carroceria1  =
    bicubic_patch {
    type 1 flatness 0.0100 u_steps 4 v_steps 4,
    <1.5 , 1.5, 0>,
    <7.5, 3, 0>,
    <9, 7.5, 0>,
    <15 , 8, 0>,
    <1.5 , 1.5, 0>,
    <7.5, 2.7, -1>,
    <9, 6.5, -1>,
    <15 , 5, -1>,
    <1.5 , 1.5, 0>,
    <7.5, 1, -2>,
    <9, 1.5, -2>,
    <15 , 2, -2>,
    <1.5 , 1.5, 0>,
    <7.5, 0, -3>,
    <9, 0, -3>,
    <15 , 0, -3>
    texture {
      TeePeeTex
    }
  }

 object { carroceria }
 object { carroceria scale <-1, 1, 1>
                      translate < 30 , 0, 0>    }
 object {carroceria1 }
 object { carroceria1 scale <-1, 1, 1>
                      translate < 30 , 0, 0>    }

 object {carroceria1 scale <1,1,-1>
                     translate <0, 0, 9>}
 object { carroceria1 scale <-1, 1, -1>
                      translate < 30, 0, 9 >}