// metall auf dem mars?
// 2/2004 christian perle
camera {
  location <2, 2, -12>*2
  direction 2*z
  look_at <0, 0, .5>
}
light_source {
  <3000, 2000, -1000>
  color rgb <2.2, 1.8, 1.5>
  area_light 500*z, 500*y, 10, 10 adaptive 1 jitter
}
light_source {
  <-2, 3000, 1>
  color rgb <.2, .3, .5>
  shadowless
}
sky_sphere {
  pigment {
    gradient y
    color_map {
      [0 rgb <.6, .7, 1>]
      [.2 rgb <.2, .3, .9>]
    }
  }
}
plane {
  y, 0
  pigment { rgb <.8, .5, .3> }
  normal {
    bozo
    scale .4
    warp {
      turbulence .8
      omega .5
      lambda 2.4
      octaves 15
    }
  }
}
#declare MetalThing = union {
  sphere { 1.4*y, 1 }
  cylinder { 0, .42*y, .1 }
  cylinder { 0, .05*y, .5 }
  torus { .5, .025 translate .025*y }
  pigment { rgb 1 }
  finish {
    diffuse .3
    ambient 0
    specular .6
    reflection .8
  }
}
#declare A = 0
union {
#while (A < 360)
  object { MetalThing translate 50*x rotate A*y }
#declare A = A+10
#end
  scale .2
}
#declare A = 0
union {
#while (A < 360)
  intersection {
    torus { 25, .25 }
    plane { x, 0 }
    rotate -90*z
    rotate A*y
  }
#declare A = A+30
#end
  pigment { rgb 1 }
  finish {
    diffuse .3
    ambient 0
    specular .6
    reflection .8
  }
  scale .2
}
#declare MLog = union {
  cylinder { -2*x, 2*x, .5 }
  sphere { -2*x, .5 }
  sphere { 2*x, .5 }
}
union {
  union {
    object { MLog }
    object { MLog rotate 90*y }
    object { MLog rotate 90*y rotate 90*x }
    pigment { rgb 1 }
    finish {
      diffuse .3
      ambient 0
      specular .6
      reflection .8
    }
    rotate <20, 30, 50>
  }
  sphere {
    0, 2.6
    pigment {
      crackle
      color_map {
        [0 color rgb<.95, .95, 1>]
        [0.03 color rgb<.95, .95, 1>]
        [0.05 color blue 1]
        [0.1 color rgbf 1]
        [0.9 color rgbf 1]
        [0.95 color blue 1]
        [0.97 color rgb<.95, .95, 1>]
        [1 color rgb<.95, .95, 1>]
      }
      turbulence .3
    }
    finish { ambient 1 diffuse 0 }
    no_shadow
  }
  scale .6
  translate 2*y
}