
// 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>
//}

//led near close button
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 <3000, 2000, -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 near close button
  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 {
    //released
    <0, -31, -25.0>, <16, -15, 20>
    //pressed    
    //<0, -31, -17.0>, <16, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  box {
    //released
    <4, -27, -26.0>, <12, -19, 0>
    //pressed
    //<4, -27, -18.0>, <12, -19, 0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  //play+pause button
  box {
    //released
    <21, -31, -25.0>, <37, -15, 20>
    //pressed
    //<21, -31, -17.0>, <37, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  triangle {
    //released
    <25, -27, -26.0>, <25, -19, -26.0>, <33, -23, -26.0>
    //pressed
    //<25, -27, -18.0>, <25, -19, -18.0>, <33, -23, -18.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  //previous button
  box {
    //released
    <42, -31, -25.0>, <58, -15, 20>
    //pressed
    //<42, -31, -17.0>, <58, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  box {
    //released
    <46, -27, -26.0>, <48, -19, 0>
    //pressed
    //<46, -27, -18.0>, <48, -19, 0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  triangle {
    //released
    <48, -23, -26.0>, <54, -19, -26.0>, <54, -27, -26.0>
    //pressed
    //<48, -23, -18.0>, <54, -19, -18.0>, <54, -27, -18.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  //back button
  box {
    //released
    <63, -31, -25.0>, <79, -15, 20>
    //pressed
    //<63, -31, -17.0>, <79, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  triangle {
    //released
    <67, -23, -26.0>, <71, -19, -26.0>, <71, -27, -26.0>
    //pressed
    //<67, -23, -18.0>, <71, -19, -18.0>, <71, -27, -18.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  triangle {
    //released
    <71, -23, -26.0>, <75, -19, -26.0>, <75, -27, -26.0>
    //pressed
    //<71, -23, -18.0>, <75, -19, -18.0>, <75, -27, -18.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  //forward button
  box {
    //released
    <84, -31, -25.0>, <100, -15, 20>
    //pressed
    //<84, -31, -17.0>, <100, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  triangle {
    //released
    <92, -23, -26.0>, <88, -19, -26.0>, <88, -27, -26.0>
    //pressed
    //<92, -23, -18.0>, <88, -19, -18.0>, <88, -27, -18.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  triangle {
    //released
    <96, -23, -26.0>, <92, -19, -26.0>, <92, -27, -26.0>
    //pressed
    //<96, -23, -18.0>, <92, -19, -18.0>, <92, -27, -18.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  //next button
  box {
    //released
    <105, -31, -25.0>, <121, -15, 20>
    //pressed
    //<105, -31, -17.0>, <121, -15, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  box {
    //released
    <117, -27, -26.0>, <119, -19, 0>
    //pressed
    //<117, -27, -18.0>, <119, -19, 0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }
  triangle {
    //released
    <117, -23, -26.0>, <109, -19, -26.0>, <109, -27, -26.0>
    //pressed
    //<117, -23, -18.0>, <109, -19, -18.0>, <109, -27, -18.0>
    texture {
      pigment { color <0.01,0.01,0.01,0.0,0.0> }
    }
  }

  //progress slider knob
  box {
    <-106, -30, -25.0>, <-102, -16, -17>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }

  //close button
  box {
    //released
    <105, 15, -25.0>, <121, 31, 20>
    //pressed
    //<105, 15, -17.0>, <121, 31, 20>
    texture {
      pigment { color <0.92,0.92,0.92,0.0,0.0> }
    }
  }
  box {
    //released
    <105, 22, -26.0>, <121, 24, 20>
    //pressed
    //<105, 22, -18.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 {
    //released
    <112, 15, -26.0>, <114, 31, 20>
    //pressed
    //<112, 15, -18.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, 30>
  texture {
   pigment { color <0.92,0.92,0.92,0,0> }
  }
  Rotate_Around_Trans(<0, 0, 135>, <180, 0, 40>)
}

//5.625 x56

/*

16.875
11.25
5.625
0
-5.625
-11.25
-16.875
-22.5
-28.125
-33.75
-39.375
-45
-50.625
-56.25
-61.875
-67.5



247.5
241.875
236.25
230.625
225
219.375
213.75
208.125
202.5
196.875
191.25
185.625
180
174.375
168.75
163.125
157.5
151.875
146.25
140.625
135
129.375
123.75
118.125
112.5
106.875
101.25
95.625
90
84.375
78.75
73.125
67.5
61.875
56.25
50.625
45
39.375
33.75
28.125
22.5
16.875
11.25
5.625
0
-5.625
-11.25
-16.875
-22.5
-28.125
-33.75
-39.375
-45
-50.625
-56.25
-61.875
-67.5
*/

