//Started 12/31/97 //Updated 11/22/99 //by -tim //http://web.abnormal.com // // original clock by // Schlabaugh & Sons // 720 14th St // Kalona IA 52247 // 319-656-2374 // dealer: Bluestem Missouri Crafts, 13 Soutn Ninth, Columbia MO 65201 //set up clock for Animation #declare Clock = clock; // What time is it? #declare Minute =45; #declare Hour =2; //#declare Hour=Clock*5; // 0 to 1 am //#declare Minute=Clock*60; #include "colors.inc" #include "textures.inc" #include "shapes.inc" #include "stones.inc" #include "woods.inc" // Create an infinite sphere around scene and allow any texture on it sky_sphere { pigment { gradient y color_map { [0.0 color rgb <0.7,0.7,1.0>] [1.0 color blue .50] } translate -.5 } } /* sky_sphere { pigment { gradient y color_map { [ 0.5 color CornflowerBlue ] [ 1.0 color MidnightBlue ] } scale 2 translate -1 } }*/ #include "teak.map" #include "whiteash.map" #declare black = Black; // to help see thigns make it blue #declare hands = Black; // should be Black or Brass, Red is good //added +56 on wood translate #declare P_WoodGrain = pigment {P_WoodGrain1A color_map { M_WhiteAsh } scale 10 rotate x*90 translate -x*6+56} // was 10 #declare P_WoodGrain1 = pigment {P_WoodGrain1A color_map { M_WhiteAsh } scale 10 rotate x*90 rotate z*90 translate -x*6} // was 10 // CAMERA POSITION camera { right < -1.33, 0, 0 > up < 0, 1, 0 > direction < 0, 0, 1 > //location < 0, 8, 40 > //location < 0, 4, 25 > look_at <0,2,0> // form animations location < .5, 11, 30 > look_at <0,0,0> // for web page 112499 //location < 0, 8, 20 > // location < -6, -0, 35 > // location < -18, -1, 3 > look at <0,0,0> // side // // location < 0, -8, 10 > //location <-20,-8,0> // side //look_at <-7.425,-9.1,4.125> // front left col base //look_at < 0, 8, 0 > //look_at <0,0,0> } // LIGHT _light0 light_source { < -20, 35, 34 > color White } // LIGHT _light1 light_source { < 0, 0, 24 > color White } // light extra light_source { <-18,-4,0> color White} light_source { <30,10,15> color White} light_source { < -8, -1, 27 > color White } //light_source { < -10, 0, 0 > color White } // BOX top_a box { < -8.45, -0.125, -4.75>, < 8.45, 0.125, 4.75> pigment { black } translate < 0, 10, 0 > } // BOX top_b box { < -8.45, -0.075, -5>, < 8.45, 0.075, 5> pigment { black } translate < 0, 9.8, 0 > } // BOX top1_a box { < -8.95, -0.075, -5.6>, < 8.95, 0.075, 5.6> pigment{P_WoodGrain} translate < 0, 9.65, 0 > } // BOX top1_b box { < -9.3, -0.325, -5.95>, < 9.3, 0.325, 5.95> pigment{P_WoodGrain} translate < 0, 9.25, 0 > } // BOX top1_c box { < -9.65, -0.3, -6.3>, < 9.65, 0.3, 6.3> pigment{P_WoodGrain} translate < 0, 8.625, 0 > } // BOX body box { < -4.9, -5.2, -3.15>, < 4.9, 5.2, 3.15> pigment{P_WoodGrain} translate < 0, 3.125, 0 > } // black BOX with bevel difference { //merge { box { < -5.9, -0.45, -4.15>, < 5.9, 0.45, 4.15> pigment{black} translate < 0, -2.775, 0 > } union { prism { // left cut linear_sweep linear_spline -10,10, 4, //<0,0>,<1.0,1.0>,<0,1.0>,<0,0> //<0,0>,<1.0,0>,<0,1>,<0,0> <-.1,-.1>,<1.1,-.1>,<-.1,1.1>,<-.1,-.1> rotate<90,0,0> translate <-5.9,-1.775,0> } prism { // right cut (mirror of left rotate 180) linear_sweep linear_spline -10,10, 4, //<0,0>,<1.0,1.0>,<0,1.0>,<0,0> //<0,0>,<1.0,0>,<0,1>,<0,0> <-.1,-.1>,<1.1,-.1>,<-.1,1.1>,<-.1,-.1> rotate<90,0,0> translate <-5.9,-1.775,0> rotate <0,180,0> } prism { // front linear_sweep linear_spline -10,10, 4, //<0,0>,<1.0,1.0>,<0,1.0>,<0,0> //<0,0>,<1.0,0>,<0,1>,<0,0> <-.1,-.1>,<1.1,-.1>,<-.1,1.1>,<-.1,-.1> rotate <0,180,90> translate <0,-1.775,4.15> } prism { // rear cut linear_sweep linear_spline -10,10, 4, //<0,0>,<1.0,1.0>,<0,1.0>,<0,0> //<0,0>,<1.0,0>,<0,1>,<0,0> <-.1,-.1>,<1.1,-.1>,<-.1,1.1>,<-.1,-.1> rotate <0,180,90> translate <0,-1.775,4.15> rotate <0,180,0> } } pigment{black} } /*// BOX space box { < -5.05, -3.2, -0.05>, < 0.05, 3.2, 0.05> //pigment{P_WoodGrain} pigment{Green} translate < 0, -6.175, 0 > }*/ // BOX check box { < -9.1, -0.15, -5.75>, < 9.1, 0.15, 5.75> pigment { // texture pigment/normal pattern // cube checker pattern, alternates color1 and color2 checker pigment{P_WoodGrain},pigment{black} scale <.8219818181,.821981818181,.821981818181> //checker pigment{Red},pigment{Blue} scale <.8219818181,.821981818181,.821981818181> // translate <.7,1,0.1> translate <.7,1,0> } translate < 0, -9.525, 0 > } //box {<-9.1,-9.375,-5.75> <-10,-10,-6> pigment {Red}} // BOX base1 box { < -9.7, -0.25, -6.2>, < 9.7, 0.25, 6.2> pigment{P_WoodGrain1} //pigment{Red} translate < 0, -9.925, 0 > } // BOX base box { < -10.15, -0.7, -6.6>, < 10.15, 0.7, 6.6> pigment{P_WoodGrain1} translate < 0, -10.875, 0 > } // Pendulum object { union { sphere { // <0, -7.175, 10> // center position // .95 is pos of arm not disk <0,-14.8,0> 2.05 //, // outer radius scale <1,1,.1> pigment{Brass} // texture finish attribute finish { ambient .1 diffuse .1 specular 1 roughness .001 reflection .75 metallic } } // box {<0,-7.175,0>,<0,7625,0> pigment {Green}} box {<.1,0,-.05>,<-.1,-14.8,0> pigment {Brass} // texture finish attribute finish { ambient .1 diffuse .1 specular 1 roughness .001 reflection .75 metallic } } } translate <0,7.625,.95> rotate <0,0,15.000*sin(radians(Clock*360))> // times sine of clock } //face // flat circular FINITE (no CSG) shape, center hole cutout is optional object { merge { //disc { // <0,0,0>// center position // 3.15 // z, // normal vector // 3.7 //, // outer radius // pigment{Green} // was White //} lathe { linear_spline 5,<3.7,0>,<3.7,.5>,<3.6,.6>,<3.5,.6>,<3.4,.5> // numbers are wrong! pigment{Brass} finish { // shiny brass ambient .1 diffuse .1 specular 1 roughness .001 reflection .75 metallic } scale <1.1,1,1.1> rotate <90,0,0> translate <0,0,0> } /* sphere { <0,0,.5>, 2.5 scale <1,1,.1> // pigment {Yellow} pigment { White filter 1 } finish { ambient 0 diffuse 0 reflection .25 refraction 1 ior 1.33 specular 1 roughness .001 } } */ } translate <0, 3, 3.16> // center position // 3.15 // translate <-2,0,1> // to check face sub object } /*sphere // glass BROKEN!!!! { <0, 4,50 > // center position // .95 is pos of arm not disk 3.7 //, // outer radius scale <1,1,.1> pigment { White filter 1 } // pigment { Red } finish { ambient 0 diffuse 0 reflection .25 refraction 1 ior 1.33 specular 1 roughness .001 } // translate <0, 3, 3.3> // center position // 3.16 } */ #declare col=difference { box {<-1.1,0,-1.1>,<1.1,17.75,1.1>} lathe { linear_spline // cubic_spline 15,<5.0,-.1>,<0,0>,<1.1,.1>,<1.0,.2>,<1.0,.3>,<.8,.4>,<1.0,.5>, <.75,15.85>, <.95,15.95>, <.75,16.15>, <.95,16.25>, <.95,16.75>, <2,17.25> <5.0,16.75>,<5.0,0> } //pigment {checker pigment{Red},pigment{Blue}} //pigment{P_WoodGrain} pigment{White} //translate <10,-9.1,5> //translate <7.425,-9.1,4.125> } //right front object { col translate <7.425,-9.1,4.125>} //Left rear object { col translate <-7.425,-9.1,-4.125>} // right rear object { col translate <7.425,-9.1,-4.125>} //left front object { col translate <-7.425,-9.1,4.125> //translate <-7.425,-10,4.125> // deep } /*cylinder // left rear { < 0,0,0>, < 0,17.75,0>,1.1 pigment{White} translate <-7.425,-9.1,-4.125> } cylinder // right rear { < 0,0,0>, < 0,17.75,0>,1.1 pigment{White} translate <7.425,-9.1,-4.125> } cylinder // left front { < 0,0,0>, < 0,17.75,0>,1.1 pigment{White} // translate <-7.425,-9.1,4.125> translate <-7.425,-10,4.125> // deep } /*cylinder // right front { < 0,0,0>, < 0,17.75,0>,1.1 pigment{White} translate <7.425,-9.1,4.125> }*/ */ /* // column with lathe difference { box {<-1.1,0,-1.1>,<1.1,17.75,1.1>} lathe { linear_spline // cubic_spline 15,<5.0,-.1>,<0,0>,<1.1,.1>,<1.0,.2>,<1.0,.3>,<.8,.4>,<1.0,.5>, <.75,15.85>, <.95,15.95>, <.75,16.15>, <.95,16.25>, <.95,16.75>, <2,17.25> <5.0,16.75>,<5.0,0> } //pigment {checker pigment{Red},pigment{Blue}} //pigment{P_WoodGrain} pigment{White} //translate <10,-9.1,5> translate <7.425,-9.1,4.125> } */ #declare hand= //hand union { //disc { <0,0,.1>, z, .1300 pigment{Green}} disc { <0,0,.1>, z, .1300 pigment {Brass} // texture finish attribute finish { ambient .1 diffuse .1 specular 1 roughness .001 reflection .75 metallic }} // should be a cylinder prism { linear_sweep linear_spline //quadratic_spline //cubic_spline -.05,.05, /*7, <0,1>, <0,0>, <.5,.5>, <.5,1>, <0,1>, <0,0>, <.5,.5>*/ //left (right in cad) //48, //57, 43, //57-14=43 //... //,0.001972 scale> <-0.0132,1> <-0.03366,0.990486> <-0.04161,0.960523> <-0.04161,0.793099> <-0.06688,0.748935> <-0.11403,0.695257> <-0.07526,0.646265> <-0.04956,0.598978> <-0.04487,0.538911> <-0.06376,0.535785> <-0.06376,0.501136> <-0.04331,0.501136> <-0.05893,0.374751> <-0.06049,0.311559> <-0.05424,0.242119> <-0.04161,0.136325> <-0.05112,0.120562> //<-0.09827,0.096847> //<-0.13291,0.059074> //<-0.15805,0.006958> //<-0.15024,-0.04516> //<-0.1109,-0.08932> //<-0.06845,-0.11303> //<-0.01022,-0.12723> //// //<-0.00852,-0.12723> //<0.0497,-0.11303> //<0.092159,-0.08932> //<0.131495,-0.04516> //<0.139305,0.006958> //<0.11417,0.059074> //<0.079523,0.096847> <0.032377,0.120562> <0.022861,0.136325> <0.035501,0.242119> <0.041748,0.311559> <0.040185,0.374751> <0.024565,0.501136> <0.045014,0.501136> <0.045014,0.535785> <0.026127,0.538911> <0.030813,0.598978> <0.056516,0.646265> <0.095283,0.695257> <0.048138,0.748935> <0.022861,0.789974> <0.022861,0.962087> <0.010364,0.988924> <-0.0132,1> //hole <-0.06674,0.696819> <-0.03209,0.734734> <-0.01008,0.778898> <0.019737,0.733172> <0.052824,0.696819> <0.018175,0.665294> <-0.00696,0.619426> <-0.03209,0.66217> <-0.06674,0.696819> //circle //<-0.29693,0> rotate <-90,0,0> pigment{hands} // was red } } #declare newtext=text { ttf "times.ttf", "I", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } // newface // face object { union { //object { hand rotate <0,0,-180>} // minutes object { hand rotate <0,0,-6*Minute>} // minutes object { hand scale <.8,.8,.8> rotate <0,0,-30*Hour-.5*Minute>} // hours disc { <0,0,0>, z, 1.0, 0.1 pigment{White} } text { ttf "times.ttf", "Schlabaugh", .01,0 pigment{Black} scale <.10,.10,1> //translate <-.25,.3,.001> translate <-.22,.3,.001> // -21 } text { ttf "times.ttf", "& Sons", .01,0 pigment{Black} scale <.10,.10,1> translate <-.15,.2,.001> // -17 } // printing at .001 disc { <0,0,.001>, z, .8125,.8 pigment{Black} } disc { <0,0,.001>, z, .7625,.75 pigment{Black} } disc { <0,0,.001>, z, .5375,.525 pigment{Black} } #declare newtext=text { ttf "times.ttf", "I", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate transvect translate <0,.575,.001> rotate <0,0,-30> } #declare newtext=text { ttf "times.ttf", "II", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate transvect translate <0,.575,.001> rotate <0,0,-60> } #declare newtext=text { ttf "times.ttf", "III", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate transvect translate <0,.575,.001> rotate <0,0,-90> } #declare newtext=text { ttf "times.ttf", "IV", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate transvect translate <0,.575,.001> rotate <0,0,-120> } #declare newtext=text { ttf "times.ttf", "V", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate transvect translate <0,.575,.001> rotate <0,0,-150> } #declare newtext=text { ttf "times.ttf", "VI", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate transvect translate <0,.575,.001> rotate <0,0,-180> } #declare newtext=text { ttf "times.ttf", "VII", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate transvect translate <0,.575,.001> rotate <0,0,-210> } #declare newtext=text { ttf "times.ttf", "VIII", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate transvect translate <0,.575,.001> rotate <0,0,-240> } #declare newtext=text { ttf "times.ttf", "IX", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate transvect translate <0,.575,.001> rotate <0,0,-270> } #declare newtext=text { ttf "times.ttf", "X", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate transvect translate <0,.575,.001> rotate <0,0,-300> } #declare newtext=text { ttf "times.ttf", "XI", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate transvect translate <0,.575,.001> rotate <0,0,-330> } #declare newtext=text { ttf "times.ttf", "XII", .01, 0 pigment{Black} scale <.15,.15,1> scale <.5,1,1> } #declare transvect = -x * max_extent(newtext).x/2; object {newtext translate <-.07,0,0> translate <0,.575,.001> } //width } //translate <0,0,5> //scale <3.17,3.17,3.17> scale <4,4,4> translate <0, 3, 3.16> // center position // 3.15 }