// Das Messer
// 3/2003 POVaddict

// force syntax version 3.1
#version 3.1

// fuer dunkle Monitore
//#global_settings { assumed_gamma 1.3 }

#include "colors.inc"
#include "textures.inc"

camera {
  location <0, 3, -6>
  direction 3*z
  look_at <0, 0, 0>
}

light_source { <-5, 6, -8> color White }
light_source { <2, 2, -2> color Gray75 }
light_source { <-.2, 2, 6> color Gray25 }

// Klinge
#declare Klinge = intersection {
  sphere { 0, 1 scale <5, .06, .5> translate -.2*z }
  sphere { 0, 1 scale <5, .06, .5> translate .2*z }
  plane { x, 1 }
  texture {
    Chrome_Metal
    normal { bozo .1 scale .003 }
  }
}

// Griff
#declare Griff = union {
  union {
    cone { <0, 0, -1>, .08, <0, 0, 0>, .7 }
    cone { <0, 0, 0>, .7, <0, 0, 1>, .08 }
    scale <.4, .1, 1>
    pigment { Gray20 }
    finish { phong 1 phong_size 15 } 
    normal { crackle .2 scale .01 }
  }
  #declare Cnt = 0
  union {
    #while (Cnt < 20)
    #declare Cnt = Cnt+1
    sphere { <Cnt/1.2, 0, 0>, 1 scale <.07, .1, .2> }
    #end
    pigment { Gray20 }
    finish { phong 1 phong_size 15 } 
  }
  sphere {
    <Cnt/1.2, 0, 0>, 1 scale <.07, .15, .3>
    texture {
      Chrome_Metal
      normal { crackle .2 scale .01 }
    }
  }
  union {
    sphere { <0, 0, -1>, .1 }
    sphere { <0, 0, 1>, .1 }
    texture {
      Chrome_Metal
      normal { crackle .2 scale .01 }
    }
  }
}

// Messer
union {
  object {
    Klinge
    scale .5
  }
  object {
    Griff
    scale .7
    translate .5*x
  }
  // Blutstropfen auf dem Messer
  blob {
    threshold .7
    component 1, .2, <0, 0, 0>
    component 1, .08, <.17, 0, .06>
    pigment { color rgb<.4, .02, .02> }
    normal { bumps 0.3 scale 0.5 }
    finish { phong 1 phong_size 15 }
    scale <1, 1/8, 1>
    rotate <-10, 0, 0>
    translate <-1.2, .0125, -.05>
  }
  rotate -60*y
  translate <-.1, .02, 1.2>
}

// Blut
blob {
  threshold .7
  component 1, .7, <-.4, 0, 0>
  component 1, .7, <.6, 0, -.5>
  component 1, .7, <0, 0, -.2>
  component 1, .7, <.2, 0, .5>
  component 1, .2, <.7, 0, .4>
  component 1, .1, <.8, 0, .45>
  component 1, .5, <1.2, 0, .7>
  pigment { color rgb<.4, .02, .02> }
  normal { bumps 0.3 scale 0.5 }
  finish { phong 1 phong_size 15 }
  scale <1, 1/10, 1>
  translate <0, -.05, -.2>
}

// Schwarzer Marmor
plane {
  y, -.05
  pigment {
    agate
    frequency 2
    color_map {
      [0 color Gray15]
      [.45 color Gray15]
      [.5 color Gray60]
      [.55 color Gray15]
      [1 color Gray15]
    }
  }
  finish { reflection .5 }
}