// Vier halbe Torusobjekte
// Neuauflage 12/2000 Christian Perle, Lars Westphal

#include "colors.inc"

camera {
  location <14, 10, -8>*1.2
  direction <0, 0, 1.5>
  look_at <0, 0, 0>
}

light_source { <20, 20, 20> color White }
light_source { <10, 500, -10> color rgb<1, .4, 0>}
light_source { <0, 0, 0> color <.9, 1, 0>*1.4 }

// Ein halber Torus
#declare Halbtor = intersection {
  torus { 4.5, .75 }
  plane { z, 0 }
  rotate 90*x
}

union {
  object {
    Halbtor
    translate 4.5*z
  }
  object {
    Halbtor
    translate -4.5*z
  }
  object {
    Halbtor
    rotate 180*x
    rotate 90*y
    translate 4.5*x
  }
  object {
    Halbtor
    rotate 180*x
    rotate 90*y
    translate -4.5*x
  }
  pigment {
    marble turbulence 1
    color_map {
      [0.0, 0.8 color rgb <0.9, 0.9, 0.9> color rgb <0.5, 0.5, 0.5>]
      [0.8, 1.0 color rgb <0.5, 0.5, 0.5> color rgb <0.2, 0.2, 0.2>]
    }
  }
  bounded_by { box { <-5.3, -5.3, -5.3>, <5.3, 5.3, 5.3> } }
}

// Eine hohle Glaskugel
difference {
  sphere { <0, 0, 0>, 1.75 }
  sphere { <0, 0, 0>, 1.7 }
  texture {
    pigment { color rgbf<1.0, 1.0, 1.0, 0.7> }
    finish {
      specular 1
      roughness 0.01
      ambient 0
      diffuse 0
      reflection 0.1
      refraction 1
      ior 1.5
    }
  }
}

// Hintergrund
sphere {
  <0, 0, 0>, 1
  hollow
  texture {
    pigment {
      bozo
      color_map {
        [0.0, 0.5 color rgb <0.8, 0.3, 0.0> color rgb <0.4, 0.0, 0.4>]
        [0.5, 0.7 color rgb <0.4, 0.0, 0.4> color rgb <0.0, 0.0, 0.3>]
        [0.7, 1.0 color rgb <0.0, 0.0, 0.3> color rgb <0.0, 0.0, 0.2>]
      }
    }
    finish { ambient 1 diffuse 0 }
    scale .2
  }
  scale 1000
  rotate 180*y
}