// Last edited on 2007-07-24 01:37:31 by stolfi
// Processed by remove-cam-lights

background{ color rgb < 0, 0, 0.5 > }

#declare gold = texture {
  pigment { color rgb <1, 0.8, 0> }
  finish {
    ambient 0.2
    diffuse 0.3
    specular 0.2  roughness 0.05
    reflection 0.3
  }
}

#declare silver = texture {
  pigment { color rgb <0.8, 0.8, 0.8> }
  finish {
    ambient 0.2
    diffuse 0.3
    specular 0.2  roughness 0.1
    reflection 0.3
  }
}

#declare ruby = texture {
  pigment { color rgbf <1, 0.1, 0.1, 0.6> }
  finish {
    ambient 0.3
    diffuse 0.2
    specular 0.3 roughness 0.05
    reflection 0.2
    ior 1.4
  }
}

sky_sphere {
  pigment {
    gradient x
    color_map {
      [0.2 color rgb <0,0,1> ]
      [0.8 color rgb <0.2,0.6,1> ]
    }
    scale 2
    translate -1
  }
}

cylinder { <-0.1,0,-3>, <-0.1,0,5.75>, 0.1 texture { silver } }
cone { <-0.1,0,5.75>, 0.1, <-0.1,0,6.25>, 0 texture { silver } }

bicubic_patch {
  type 1
  u_steps 3
  v_steps 3
  <0,0,2>, <2.75,0.5,2>, <3,2.5,4>, <6,-0.5,3.25>,
  <0.35,-0.2,3.25>, <3,-0.75,4>, <3.25,2,4.75>, <6,1,4>,
  <0.25,-0.1,4.5>, <3,-0.75,4.5>, <3.25,2,6>, <6,1,5.5>,
  <0,0,5.75>, <2.5,0,5>, <3.5,1.5,7.25>, <5.75,-0.5,6.5>
  // pigment {uv_mapping image_map { png "saojose.png" } }
  pigment {uv_mapping image_map { jpeg "jsflag.jpg" } }
}

// Original camera parameters:
// #local cam_ctr = <0,0,4>
// #local cam_vec = (<0,-10,6>-<0,0,4>)
// #local cam_sky = z

#include "camlight.inc"
camlight(<0,0,4>,<10,10,10>,20.0,z,1.0)