/* povray.pov - shows an alarm clock Jeffrey Grafton 12/30/2002 20:46 This program is released under the GNU General Public License. A copy of this license is available online at http://www.gnu.org/copyleft/gpl.html. */ #include "colors.inc" #include "woods.inc" #include "textures.inc" #include "metals.inc" #include "glass.inc" #declare SLANT = <23, 0, 0> #declare theta = (clock - 0.3) * 2.5 * 3.1415926535; camera { /* uncomment the following if you're animating it and you want to make it follow that neato path */ /* #if (clock < 0.3) location <0, 21 - (clock * 60), 5> #else #if (clock < 0.7) location <0 + 13 * sin(theta), 3, -1.5 + 6.5 * cos(theta)> #else location <0, 3, -8> #end #end look_at <0, 1, 1> */ location <7, 4, -6> look_at <1, 1, 2> } light_source { <10, 20, -10> color rgbf <2.0, 2.0, 2.0, 0.0> } difference { union { box { <-5, 0, 0>, <5, 2, 7> texture { T_Wood17 rotate <0, 90, 0> } } box { <-5.03, -1, -0.21>, <5.03, 3, 0> texture { T_Silver_2B } rotate SLANT } } box { <-6, -1, -2>, <6, 3, -0.2> texture { T_Silver_2B } rotate SLANT } box { <-6, 2.03, -2>, <6, 5, 5> texture { T_Silver_2B } } box { <-6, -0.03, -2>, <6, -5, 5> texture { T_Silver_2B } } box { <-4.8, 0.2, -2>, <4.8, 1.8, 0.0> texture { T_Silver_2B } rotate SLANT } box { <1, 1.9, 1.35>, <4, 2.5, 2.05> texture { T_Wood17 rotate <0, 90, 0> } } box { <-0.7, 1.9, 1.35>, <0.5, 2.5, 2.05> texture { T_Wood17 rotate <0, 90, 0> } } box { <-2.0, 1.9, 1.35>, <-0.8, 2.5, 2.05> texture { T_Wood17 rotate <0, 90, 0> } } box { <-3.3, 1.9, 1.35>, <-2.1, 2.5, 2.05> texture { T_Wood17 rotate <0, 90, 0> } } box { <-4.6, 1.9, 1.35>, <-3.4, 2.5, 2.05> texture { T_Wood17 rotate <0, 90, 0> } } // speaker box { <-4, 1.0, 4.8>, <-1.0, 3.0, 4.9> texture { T_Wood17 rotate <0, 90, 0> } } box { <-3.9, 1.0, 5.0>, <-1.1, 3.0, 5.1> texture { T_Wood17 rotate <0, 90, 0> } } box { <-3.7, 1.0, 5.2>, <-1.3, 3.0, 5.3> texture { T_Wood17 rotate <0, 90, 0> } } box { <-3.4, 1.0, 5.4>, <-1.6, 3.0, 5.5> texture { T_Wood17 rotate <0, 90, 0> } } box { <-3, 1.0, 5.6>, <-2, 3.0, 5.7> texture { T_Wood17 rotate <0, 90, 0> } } box { <-4, 1.0, 4.6>, <-1.0, 3.0, 4.7> texture { T_Wood17 rotate <0, 90, 0> } } box { <-4, 1.0, 4.4>, <-1.0, 3.0, 4.5> texture { T_Wood17 rotate <0, 90, 0> } } box { <-3.9, 1.0, 4.2>, <-1.1, 3.0, 4.3> texture { T_Wood17 rotate <0, 90, 0> } } box { <-3.7, 1.0, 4.0>, <-1.3, 3.0, 4.1> texture { T_Wood17 rotate <0, 90, 0> } } box { <-3.4, 1.0, 3.8>, <-1.6, 3.0, 3.9> texture { T_Wood17 rotate <0, 90, 0> } } box { <-3.0, 1.0, 3.6>, <-2.0, 3.0, 3.7> texture { T_Wood17 rotate <0, 90, 0> } } } box { <-4.8, 0.2, -0.01>, <4.8, 1.8, 0> pigment { color rgbf <0.0, 0.0, 0.0, 0.0> } finish { reflection 0.3 phong 0.4 } rotate SLANT } text { #if (clock < 0.9) ttf "fonts/digir.ttf" " 2:38" 0.1, 0 #else ttf "fonts/digir.ttf" " 2:39" 0.1, 0 #end pigment { color rgbf <1.0, 0.0, 0.0, 0.0> } finish { ambient 1 } scale 1.6 translate <-3.5, 0.4, -0.05> rotate SLANT } text { ttf "fonts/aqua.ttf" "pm" 0.1, 0 pigment { color rgbf <1.0, 1.0, 1.0, 0.0> } finish { ambient 0.6 } scale 0.3 translate <-4.37, 1.25, -0.01> rotate SLANT } text { ttf "fonts/aqua.ttf" "alarm" 0.1, 0 pigment { color rgbf <1.0, 1.0, 1.0, 0.0> } finish { ambient 0.6 } scale 0.3 translate <-4.37, 0.65, -0.01> rotate SLANT } text { ttf "fonts/digir.ttf" "." 0.1, 0 pigment { color rgbf <1.0, 0, 0, 0> } finish { ambient 1 } scale 2 translate <-4.6, 0.65, -0.05> rotate SLANT } union { box { <1.05, 1.9, 1.4>, <3.95, 2.03, 2.0> pigment { color rgbf <0.0, 0.0, 0.0, 0.0> } finish { reflection 0.3 phong 0.7 } } text { ttf "fonts/aqua.ttf" "snooze" 0.1, 0 pigment { color rgbf <1.0, 1.0, 1.0, 0.0> } finish { ambient 0.6 } scale 0.4 rotate <90, 0, 0> translate <1.9, 2.05, 1.6> } } union { box { <-0.65, 1.9, 1.4>, <0.45, 2.03, 2.0> pigment { color rgbf <0.0, 0.0, 0.0, 0.0> } finish { reflection 0.3 phong 0.7 } } text { ttf "fonts/aqua.ttf" "sleep" 0.1, 0 pigment { color rgbf <1.0, 1.0, 1.0, 0.0> } finish { ambient 0.6 } scale 0.4 rotate <90, 0, 0> translate <-0.47, 2.05, 1.6> } } union { box { <-1.95, 1.9, 1.4>, <-0.85, 2.03, 2.0> pigment { color rgbf <0.0, 0.0, 0.0, 0.0> } finish { reflection 0.3 phong 0.7 } } text { ttf "fonts/aqua.ttf" "min" 0.1, 0 pigment { color rgbf <1.0, 1.0, 1.0, 0.0> } finish { ambient 0.6 } scale 0.4 rotate <90, 0, 0> translate <-1.65, 2.05, 1.6> } } union { box { <-3.25, 1.9, 1.4>, <-2.05, 2.03, 2.0> pigment { color rgbf <0.0, 0.0, 0.0, 0.0> } finish { reflection 0.3 phong 0.7 } } text { ttf "fonts/aqua.ttf" "hour" 0.1, 0 pigment { color rgbf <1.0, 1.0, 1.0, 0.0> } finish { ambient 0.6 } scale 0.4 rotate <90, 0, 0> translate <-3, 2.05, 1.6> } } union { box { <-4.55, 1.9, 1.4>, <-3.45, 2.03, 2.0> pigment { color rgbf <0.0, 0.0, 0.0, 0.0> } finish { reflection 0.3 phong 0.7 } } text { ttf "fonts/aqua.ttf" "alarm" 0.1, 0 pigment { color rgbf <1.0, 1.0, 1.0, 0.0> } finish { ambient 0.6 } scale 0.4 rotate <90, 0, 0> translate <-4.4, 2.05, 1.6> } } box { <3.0, 0.5, -0.03>, <3.1, 1.5, -0.03> pigment { color rgbf <1.0, 0.0, 0.0, 0.7> } rotate SLANT } box { <0.5, 0.99, -0.02>, <3.8, 1.01, -0.02> pigment { color rgbf <1.0, 1.0, 1.0, 0.0> } finish { ambient 0.6 } rotate SLANT } text { ttf "fonts/aqua.ttf" "fm 88 92 96 100 104 108 mhz" 0.1, 0 pigment { color rgbf <1.0, 1.0, 1.0, 0.0> } finish { ambient 0.6 } scale 0.3 translate <0.08, 1.25, -0.01> rotate SLANT } text { ttf "fonts/aqua.ttf" "am 500 750 1000 1250 1500 khz" 0.1, 0 pigment { color rgbf <1.0, 1.0, 1.0, 0.0> } finish { ambient 0.6 } scale 0.3 translate <0.08, 0.65, -0.01> rotate SLANT } cylinder { <3.7, 0.3, 1.8>, <3.7, 0.4, 1.8>, 1.5 pigment { color rgbf <0.0, 0.0, 0.0, 0.0> } finish { reflection 0.3 phong 0.7 } } cylinder { <3.7, 0.3, 4.2>, <3.7, 0.4, 4.2>, 1.5 pigment { color rgbf <0.0, 0.0, 0.0, 0.0> } finish { reflection 0.3 phong 0.7 } } text { ttf "fonts/aqua.ttf", "tuning", 0.1, 0 pigment { color rgbf <0.0, 0.0, 0.0, 0.0> } scale 0.3 rotate <0, -90, 0> translate <5.01, 0.48, 1.48> } text { ttf "fonts/aqua.ttf", "volume", 0.1, 0 pigment { color rgbf <0.0, 0.0, 0.0, 0.0> } scale 0.3 rotate <0, -90, 0> translate <5.01, 0.48, 3.78> }