
// Annotated example from POV-Ray tutorial
// http://www.povray.org/documentation/3.7.0/t2_2.html#t2_2_1_6
//
// Generate PNG with:
//
//   $ povray +IHelloSphere.pov
//  povray +IHelloSphere.pov +W1600 +H1200

#version 3.7;
#include "colors.inc"  // Include color name macros
#include "transforms.inc"


global_settings {
  assumed_gamma 1.0 
}
background { color <1.00,0.00,1.00,0.0,0.0> }

// Lights!
//

light_source {
  // X, Y, and Z coordinates of the light source
  <3000, 3000, -6000>
  rgb <0.75,0.75,0.75>
  //color White
}

//light_source {
//  <0, 0, -2>
//  rgb <0.25,0.0,0.0>
//}
light_source {
  <92, 23, -22>
  rgb <0.20,0.0,0.0>
}


//light_source {
//  <-400, 400, -600>
//  color White
//}

//light_source {
//  <-400, -400, -600>
//  color White
//}





// Camera!
//
camera {
  right x*1
  up y
  location <1500, 1500, -4000>  // X, Y and Z coordinates of the camera
  look_at  <0, 0, 0>  // X, Y and Z coordinates of where the camera is aimed
}

// Object!
//
//sphere {
//  <0, 0, 0>, 300         // X, Y, Z and radius of the sphere
//  texture {
//    pigment { color Gray }
//  }
//}


//sphere {
//  <0, 26, -22>, 4
//  texture {
//    pigment { rgb <1.0,0.0,0.0> }
// }
//}


//box {
//  <-260, -44, -1>, <260, 44, 20>
//  texture {
//    pigment { color <1.0,0.0,1.0,0.0,0.0> }
//  }
//}

difference{
  //main box
  box {
    <-216, -36, -21>, <180, 36, 20>
    texture {
      pigment { color <0.569,0.569,0.569,0.0,0.0> }
    }
  }
  //progress display window
  box {
    <-200, -10, -22.0>, <-112, 10, 21>
    texture {
      pigment { color <0.569,0.569,0.569,0.0,0.0> }
    }
  }
  //title display window
  box { 
    <-104, -10, -22.0>, <128, 10, 21>
    texture {
      pigment { color <0.569,0.569,0.569,0.0,0.0> }
    }
  }

  //stop button
  box {
    <0, -31, -22.0>, <16, -15, 21>
    texture {
      pigment { color <0.569,0.569,0.569,0.0,0.0> }
    }
  }
  //play+pause button
  box {
    <21, -31, -22.0>, <37, -15, 21>
    texture {
      pigment { color <0.569,0.569,0.569,0.0,0.0> }
    }
  }
  //previous button
  box {
    <42, -31, -22.0>, <58, -15, 21>
    texture {
      pigment { color <0.569,0.569,0.569,0.0,0.0> }
    }
  }
  //backwards button
  box {
    <63, -31, -22.0>, <79, -15, 21>
    texture {
      pigment { color <0.569,0.569,0.569,0.0,0.0> }
    }
  }
  //forwards button
  box {
    <84, -31, -22.0>, <100, -15, 21>
    texture {
      pigment { color <0.569,0.569,0.569,0.0,0.0> }
    }
  }
  //next button
  box {
    <105, -31, -22.0>, <121, -15, 21>
    texture {
      pigment { color <0.569,0.569,0.569,0.0,0.0> }
    }
  }
  //close button 
  box {
    <105, 15, -22.0>, <121, 31, 21>
    texture {
      pigment { color <0.569,0.569,0.569,0.0,0.0> }
    }
  }

  //red led
  sphere {
    <92, 23, -22>, 4
    texture {
      pigment { rgb <1.0,0.0,0.0> }
   }
  }
  //progress slider cavity
  box {
//    <-200, -31, -22>, <-8, -15, -17>
    <-200, -24, -22>, <-8, -22, -17>
    texture {
      pigment { color <0.569,0.569,0.569,0.0,0.0> }
    }
  }

  finish{brilliance 2.0 diffuse albedo 0.0 ambient -50.0 reflection 0.0 crand 0.5}
}

  //progress display
  box {
    <-200, -10, -17.0>, <-112, 10, 20>
    texture {
      pigment { color <0.02,0.02,0.02,0.0,0.0> }
    }
  }
  //title display
  box {
    <-104, -10, -17.0>, <128, 10, 20>
    texture {
      pigment { color <0.02,0.02,0.02,0.0,0.0> }
    }
  }

  //stop button
  box {
    //<0, -31, -22.0>, <16, -15, 21>
    <0, -31, -17.0>, <16, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  box {
    <4, -27, -18.0>, <12, -19, 0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  //play+pause button
  box {
    <21, -31, -24.0>, <37, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  triangle {
    <25, -27, -25.0>, <25, -19, -25.0>, <33, -23, -25.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  //previous button
  box {
    <42, -31, -24.0>, <58, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  box {
    <46, -27, -25.0>, <48, -19, 0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  triangle {
    <48, -23, -25.0>, <54, -19, -25.0>, <54, -27, -25.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  //back button
  box {
    <63, -31, -24.0>, <79, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  triangle {
    <67, -23, -25.0>, <71, -19, -25.0>, <71, -27, -25.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  triangle {
    <71, -23, -25.0>, <75, -19, -25.0>, <75, -27, -25.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  //forward button
  box {
    <84, -31, -24.0>, <100, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  triangle {
    <92, -23, -25.0>, <88, -19, -25.0>, <88, -27, -25.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  triangle {
    <96, -23, -25.0>, <92, -19, -25.0>, <92, -27, -25.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  //next button
  box {
    <105, -31, -24.0>, <121, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  box {
    <117, -27, -25.0>, <119, -19, 0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  triangle {
    <117, -23, -25.0>, <109, -19, -25.0>, <109, -27, -25.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  //progress slider knob
  box {
    <-106, -30, -24.0>, <-102, -16, -17>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  //close button
  box {
    <105, 15, -24.0>, <121, 31, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  box {
    <105, 22, -25.0>, <121, 24, 20>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
    Rotate_Around_Trans(<0, 0, 45>, <113, 23, -25>)
  }
  box {
    <112, 15, -25.0>, <114, 31, 20>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
    Rotate_Around_Trans(<0, 0, 45>, <113, 23, -25>)
  }

  text {
    internal 1, "MPlayer", 2, 0.1*x
    //texture {
    pigment { color <0.01,0.01,0.01,0.0,0.0> }
      //finish{ambient 0.15 diffuse 0.85}
    //}
    scale <16, 16, 16>
    //translate<0,0,50>
    translate <-200, 18, -23>
    finish{}
  }

//    text {
//      ttf "timrom.ttf" "Mr. Ferrante's Homepage" 1, 0  // depth=1, spacing=0
//      translate <-5.4, -0.5, -50>                     // center it
//      scale <0.5, 0.5, 0.5>                            // shrink it
//      pigment { Gold }                                 // assign color gold
//      finish { phong 0.9 }                             // make it shiny
//     }


//text{
//  internal 0,
   //ttf "arial.ttf",
//   "text object",4, -100
//   texture{
//     pigment{color rgb<1,0.0,0>}
//     finish{ambient 0.15
//            diffuse 0.85}
//    }
   //translate<0,0,0.5>
//}


difference{
//  sphere{0, 0}, 300
//  sphere{0, -1}, 300


sphere {
<180, 0, -20>, 36
  texture {
   pigment { color <0.569,0.569,0.569,0.0,0.0> }
  }
//  no_reflection
//  no_shadow
}

sphere { 
<180, 0, -84>, 44
  texture {
   pigment { color <0.569,0.569,0.569,0.0,0.0> }
  }
//  no_reflection
//  no_shadow
}
//box {
//  <230, 30, -270>, <150, -30, 600>
//  texture { pigment { color <0.92,0.92,0.92,0,0> } }
//}

  //plane{z,0}
  //pigment{Red}
  //pigment { color <145,145,145> }
  finish{brilliance 2.0 diffuse albedo 0.0 ambient -100.0 reflection 0.0 crand 0.5}
}

box {
  <205, -2, -50>, <216, 2, 50>
  texture {
   //pigment { color Red }
   pigment { color <0.92,0.92,0.92,0,0> }
  }
  Rotate_Around_Trans(<0, 0, 155>, <180, 0, 40>)
//  rotate <0, 0, 135>
//  no_reflection
//  no_shadow
}



