// Last edited on 2003-12-14 23:14:10 by stolfi
#include "colors.inc"
#include "glass.inc"
#include "skies.inc"

global_settings {
  assumed_gamma 1.3
  max_trace_level 3
}

// ----------------------------------------

#declare posicao_olho = <0, 10, 0>;

// #declare olho_cam = posicao_olho +30*z;
#declare olho_cam = posicao_olho + <10,15,20>;

#declare ctr = posicao_olho;
#declare camDir = (olho_cam) - (posicao_olho);

camera {
  location   ctr + 1.00*camDir
  right      -0.4*x
  up         0.4*y
  sky        y
  look_at    ctr
}

sky_sphere {
  S_Cloud1
}

light_source {
  0
  color rgb 2    
  area_light
  <4, 0, 0> <0, 0, 4> 
  4, 4                
  adaptive 0          
  jitter              
  translate 100
  //translate 5
}

plane {
  y, 0
  material {
        texture {
                pigment {
                        color 0.3
                }
                finish {
                        diffuse 0.3
                        ambient 0.0
                        specular 0.6
                        reflection {
                                0.8
                                metallic
                        }
                        conserve_energy
                }
        }  
       
  }
  pigment { rgb <0.3, 0.3, 0.9> }  
}


// ----------------------------------------

#declare material_letra = 
material {
        texture {
                pigment {
                        color DarkSlateGrey
                }
                finish {
                        diffuse 0.3
                        ambient 0.0
                        specular 0.6
                        reflection {
                                0.8
                                metallic
                        }
                        conserve_energy
                }
        }
}
  
#declare material_iris =
material {
  texture {
    pigment {rgbt 1}
    finish {
      ambient 0.7
      diffuse 0.05
      specular 0.6
      roughness 0.005
      reflection {
        0.1, 1.0
        fresnel on
      }
      conserve_energy
    }
  }
  interior {
    ior 1.5
    fade_power 1001
    fade_distance 0.9
    fade_color Col_Sapphire_01
  }
}

#declare material_centro =
material {
  texture {
    pigment {rgbt 0}
    finish {
      ambient 0.0
      diffuse 0.05
      specular 0.6
      roughness 0.005
      reflection {
        0.1, 1.0
        fresnel on
      }
      conserve_energy
    }
  }
  interior {
    ior 1.5
    fade_power 1001
    fade_distance 0.9
    fade_color Black
  }
}

#declare material_olho1 =
material {
  texture {
    pigment {rgbt 1}
    finish {
      ambient 0.0
      diffuse 0.05
      specular 0.6
      roughness 0.005
      reflection {
        0.1, 1.0
        fresnel on
      }
      conserve_energy
    }
  }
  interior {
    ior 1
  }
}

#declare material_olho2 = 
material {
  texture {
    pigment { White }
  }
}

#declare liv = text {
  ttf 
  "cour.ttf"
  "LiV" 
  0.2, 0 
  material { material_letra } 
  finish { ambient 0.8 }
}

#declare centro = sphere {
  0, 1
  material { material_centro }
  scale <1, 1, 0.1>
}

#declare iris = sphere {
  0, 1
  material { material_iris }
  scale <2, 2, 0.3>
}

#declare olho2 = difference {
  intersection {
    sphere { 0, 1 }
    sphere { <0, 0.66, 0>, 1 }
  }
  plane {
    -z, 0
  }
  translate <0, -0.66, 0>
  material { material_olho2 } 
  scale <1.5, 1, 1>
  scale 3.5
}

#declare olho1 = difference {
  intersection {
    sphere { 0, 1 }
    sphere { <0, 0.66, 0>, 1 }
  }
  plane {
    z, 0
  }
  translate <0, -0.66, 0>
  material { material_olho1 } 
  scale <1.5, 1, 0.5>
  scale 3.5
}


    
#declare olho = union {
  object { iris  translate <0, 0, 0> }
  object { centro  translate <0, 0, 0> }
  object { liv  translate <-0.9, -0.3, 0> }
//  object { olho1  translate <0, 1.1, 0> }
  object { olho2  translate <0, 1.1, 0> }
}

object { olho translate posicao_olho }