// PoVRay 3.6 Scene File "rot_shot.pov" // author: Florian Simon // date: 2012/01/23 //-------------------------------------------------------------------------- #if ( version < 3.7 ) global_settings{ assumed_gamma 1.0 } #end #default{ finish{ ambient 0.1 diffuse 0.9 }} //-------------------------------------------------------------------------- #include "colors.inc" #include "textures.inc" #include "glass.inc" #include "metals.inc" #include "golds.inc" #include "stones.inc" #include "woods.inc" #include "shapes.inc" #include "shapes2.inc" #include "functions.inc" #include "math.inc" #include "transforms.inc" #include "analytical_g.inc" #include "Clock_Splitting.inc" //-------------------------------------------------------------------------- // camera ------------------------------------------------------------------ #declare Camera_0 = camera {/*ultra_wide_angle*/ angle 75 // front view location <-1.0 , 1.0 ,-3.0> right x*image_width/image_height look_at <0.0 , 1.0 , 0.0>} #declare Camera_1 = camera {/*ultra_wide_angle*/ angle 90 // diagonal view location <-2.0 , 2.5 ,-3.0> right x*image_width/image_height look_at <0.0 , 1.0 , 0.0>} #declare Camera_2 = camera {/*ultra_wide_angle*/ angle 90 // right side view location <3.0 , 1.0 , 0.0> right x*image_width/image_height look_at <0.0 , 1.0 , 0.0>} #declare Camera_3 = camera {/*ultra_wide_angle*/ angle 90 // top view location <-0.2 , 3.0 ,-0.4>*1.2 right x*image_width/image_height look_at <0.0 , 1.0 , 0.0>} camera{Camera_3} // sun --------------------------------------------------------------------- light_source{<-1500,2500,-2500> color White} // sky --------------------------------------------------------------------- sky_sphere { pigment { gradient <0,1,0> color_map { [0.00 rgb <1.0,1.0,1.0>] [0.30 rgb <0.0,0.1,1.0>] [0.70 rgb <0.0,0.1,1.0>] [1.00 rgb <1.0,1.0,1.0>] } scale 2 } // end of pigment } //end of skysphere // fog --------------------------------------------------------------------- fog{fog_type 2 distance 50 color White fog_offset 0.1 fog_alt 2.0 turbulence 0.8} // ground ------------------------------------------------------------------ plane{ <0,1,0>, 0 texture{ pigment{ color rgb <1.00,0.95,0.95>} normal { bumps 0.15 scale 0.025 } finish { phong 0.7 } } // end of texture } // end of plane //-------------------------------------------------------------------------- //---------------------------- objects in scene ---------------------------- //-------------------------------------------------------------------------- // equations --------------------------------------------------------------- #declare X = 0.000 ; // Abs. X translate overall #declare Y = 0.000 ; // Abs. Y translate overall #declare Z = 0.300 ; // Abs. Z translate overall #declare XR = 000 ; // Abs. X rotate overall #declare YR = 000 ; // Abs. X rotate overall #declare ZR = 000 ; // Abs. X rotate overall #declare rP = 0.25 ; // radius puck #declare l = 2.00 ; // #declare h = 0.50 ; // hitbox #declare b = 0.50 ; // #declare Al = 0.0*0.5*l ; #declare v0 = 2.00 ; #declare s0 = v0 ; #declare rhoP = 5.00 ; #declare rhoB = 1.00 ; #declare mP = 0.70*rP*pi*pow(rP,2)*rhoP ; // mass #declare mB = l*b*h*rhoB ; #declare J = (1/12)*mB*((l*l)+(b*b)) ; #declare vmB = v0/(( (mB/mP)+1+(mB*Al*Al/J) )/2) ; #declare Om = mB*Al*vmB/J ; #declare U = Om/(2*pi)*360 ; #declare v1 = v0-(mB/mP)*vmB ; // equations --------------------------end---------------------------------- // objects ----------------------------------------------------------------- #declare puck = object{ cylinder { <0,0,0>,<0,0.7*rP,0>, rP texture { pigment { color rgb<1,1,1>*0.1 } //normal { bumps 0.5 scale <0.005,0.25,0.005>} finish { phong 0.5 reflection 0.00 } } // end of texture scale <1,1,1> rotate<0,0,0> translate<0,0,0> } // end of cylinder ------------------------------------- } #declare hitbox = union{ #declare Pigment_Pine_Wood3 = pigment{ wood turbulence 0.02 octaves 4 lambda 3 scale 0.175 rotate <1, 1, 0> color_map { [0.0 color rgb <1.30, 0.99, 0.64> ] [0.5 color rgb <0.75, 0.39, 0.17> ] [0.7 color rgb <0.75, 0.39, 0.17> ] [1.0 color rgb <1.30, 0.99, 0.64> ] }// end of color_map } // end of pigment //-------------------------------------------------------------------------- #declare Pine_Wood_Bord_Texture = texture{ pigment{ Pigment_Pine_Wood3 } normal { pigment_pattern{ Pigment_Pine_Wood3 } 0.25 // pattern intensity ! translate<0,0,0> } // end normal finish { phong 0.3 phong_size 5 } scale 0.2 translate <0.16,0.025,0.2> } // end of texture ------------- //-------------------------------------------------------------------------- sphere{ <0,0,0>, 0.10 texture { pigment{ color rgb<1.00, 0.0, 0.00>} finish { phong 1.0 reflection 0.00}} translate<0,h,0> no_shadow } box { <0.00, 0.00, 0.00>,< b, h, l> texture{ Pine_Wood_Bord_Texture } scale<1,1,1> rotate<0,0,0> translate<-0.5*b,0,-0.5*l> } // end of box ......------------------------------------------------- } #declare hitbox1 = union{ #declare Pigment_Pine_Wood3 = pigment{ wood turbulence 0.02 octaves 4 lambda 3 scale 0.175 rotate <1, 1, 0> color_map { [0.0 color rgb <1.30, 0.99, 0.64> transmit 0.4] [0.5 color rgb <0.75, 0.39, 0.17> transmit 0.4] [0.7 color rgb <0.75, 0.39, 0.17> transmit 0.4] [1.0 color rgb <1.30, 0.99, 0.64> transmit 0.4] }// end of color_map } // end of pigment //-------------------------------------------------------------------------- #declare Pine_Wood_Bord_Texture = texture{ pigment{ Pigment_Pine_Wood3 } normal { pigment_pattern{ Pigment_Pine_Wood3 } 0.25 // pattern intensity ! translate<0,0,0> } // end normal finish { phong 0.3 phong_size 5 } scale 0.2 translate <0.16,0.025,0.2> } // end of texture ------------- //-------------------------------------------------------------------------- sphere{ <0,0,0>, 0.10 texture { pigment{ color rgb<1.00, 0.0, 0.00> transmit 0.4} finish { phong 1.0 reflection 0.00}} translate<0,h,0> no_shadow } box { <0.00, 0.00, 0.00>,< b, h, l> texture{ Pine_Wood_Bord_Texture } no_shadow scale<1,1,1> rotate<0,0,0> translate<-0.5*b,0,-0.5*l> } // end of box ......------------------------------------------------- } #declare hitbox2 = union{ #declare Pigment_Pine_Wood3 = pigment{ wood turbulence 0.02 octaves 4 lambda 3 scale 0.175 rotate <1, 1, 0> color_map { [0.0 color rgb <1.30, 0.99, 0.64> transmit 0.6] [0.5 color rgb <0.75, 0.39, 0.17> transmit 0.6] [0.7 color rgb <0.75, 0.39, 0.17> transmit 0.6] [1.0 color rgb <1.30, 0.99, 0.64> transmit 0.6] }// end of color_map } // end of pigment //-------------------------------------------------------------------------- #declare Pine_Wood_Bord_Texture = texture{ pigment{ Pigment_Pine_Wood3 } normal { pigment_pattern{ Pigment_Pine_Wood3 } 0.25 // pattern intensity ! translate<0,0,0> } // end normal finish { phong 0.3 phong_size 5 } scale 0.2 translate <0.16,0.025,0.2> } // end of texture ------------- //-------------------------------------------------------------------------- sphere{ <0,0,0>, 0.10 texture { pigment{ color rgb<1.00, 0.0, 0.00> transmit 0.6} finish { phong 1.0 reflection 0.00}} translate<0,h,0> no_shadow } box { <0.00, 0.00, 0.00>,< b, h, l> texture{ Pine_Wood_Bord_Texture } no_shadow scale<1,1,1> rotate<0,0,0> translate<-0.5*b,0,-0.5*l> } // end of box ......------------------------------------------------- } #declare hitbox3 = union{ #declare Pigment_Pine_Wood3 = pigment{ wood turbulence 0.02 octaves 4 lambda 3 scale 0.175 rotate <1, 1, 0> color_map { [0.0 color rgb <1.30, 0.99, 0.64> transmit 0.8] [0.5 color rgb <0.75, 0.39, 0.17> transmit 0.8] [0.7 color rgb <0.75, 0.39, 0.17> transmit 0.8] [1.0 color rgb <1.30, 0.99, 0.64> transmit 0.8] }// end of color_map } // end of pigment //-------------------------------------------------------------------------- #declare Pine_Wood_Bord_Texture = texture{ pigment{ Pigment_Pine_Wood3 } normal { pigment_pattern{ Pigment_Pine_Wood3 } 0.25 // pattern intensity ! translate<0,0,0> } // end normal finish { phong 0.3 phong_size 5 } scale 0.2 translate <0.16,0.025,0.2> } // end of texture ------------- //-------------------------------------------------------------------------- sphere{ <0,0,0>, 0.10 texture { pigment{ color rgb<1.00, 0.0, 0.00> transmit 0.8} finish { phong 1.0 reflection 0.00}} translate<0,h,0> no_shadow } box { <0.00, 0.00, 0.00>,< b, h, l> texture{ Pine_Wood_Bord_Texture } no_shadow scale<1,1,1> rotate<0,0,0> translate<-0.5*b,0,-0.5*l> } // end of box ......------------------------------------------------- } // objects -----------------------------end--------------------------------- #declare Total=6 ; #declare StepNr=1 ; #declare FontTex1 = texture { pigment{ color rgbt <1,0,0,pow(Sclock_01(1,Total),0.01)>} normal { facets size 0.25 } }; #declare FontTex2 = texture { pigment{ color rgbt <1,0,0,pow(Sclock_01(2,Total),0.01)>} normal { facets size 0.25 } }; #declare FontTex3 = texture { pigment{ color rgbt <1,0,0,pow(Sclock_01(4,Total),0.01)>} normal { facets size 0.25 } }; #declare FontTex4 = texture { pigment{ color rgbt <1,0,0,pow(Sclock_01(5,Total),0.01)>} normal { facets size 0.25 } }; #if ( clock translate rotate} object{hitbox translate<0.5*b,0,0> translate rotate} #declare A = <-rP-s0,0,0>; #declare B = <-rP-s0+2,0,0>; union{ object{ Vector( A,B, 0.06) pigment{ color rgbt<0.2,0.5,0.0,pow(Sclock_01(StepNr,Total),0.01)> } no_shadow } text { ttf "arial.ttf", "v", 0.05, 0.0 scale 0.7 texture {FontTex1} rotate<90,18,0> translate<-1,1,0> no_shadow } translate rotate } #else #declare StepNr = StepNr +1 ; #if ( clock translate rotate} object{hitbox rotate<0,U*Sclock_01(StepNr,Total),0> translate<0.5*b+vmB*Sclock_01(StepNr,Total),0,0> translate rotate} #declare A = ; #declare B = ; union{ object{ Vector( A,B, 0.06) pigment{ color rgbt<0.2,0.5,0.0,pow(Sclock_01(StepNr,Total),0.01)> } no_shadow } text { ttf "arial.ttf", "v'", 0.05, 0.0 scale 0.7 texture {FontTex2} rotate<90,18,0> translate<1.2,1,0> no_shadow } translate rotate } #declare A = <-2*rP,0,0>; #declare B = <-2*rP-1.2,0,0>; union{ object{ Vector( A,B, 0.06) pigment{ color rgbt<0.2,0.5,0.0,pow(Sclock_01(StepNr,Total),0.01)> } no_shadow } text { ttf "arial.ttf", "v''", 0.05, 0.0 scale 0.7 texture {FontTex2} rotate<90,18,0> translate<-1.2,1,0> no_shadow } translate rotate } #else #declare StepNr = StepNr +1 ; #declare Al = 0.7*-0.5*l ; #declare vmB = v0/(( (mB/mP)+1+(mB*Al*Al/J) )/2) ; #declare Om = mB*Al*vmB/J ; #declare U = Om/(2*pi)*360 ; #declare v1 = v0-(mB/mP)*vmB ; #if ( clock translate rotate} object{hitbox translate<0.5*b,0,0> translate rotate} #else #declare StepNr = StepNr +1 ; #if ( clock translate rotate} object{hitbox translate<0.5*b,0,0> translate rotate} #declare A = <-rP-s0,0,Al>; #declare B = <-rP-s0+2,0,Al>; union{ object{ Vector( A,B, 0.06) pigment{ color rgbt<0.2,0.5,0.0,pow(Sclock_01(StepNr,Total),0.01)> } no_shadow } text { ttf "arial.ttf", "v", 0.05, 0.0 scale 0.7 texture {FontTex3} rotate<90,18,0> translate<-1,1,Al> no_shadow } translate rotate } #else #declare StepNr = StepNr +1 ; #if ( clock translate rotate} object{hitbox rotate<0,U*Sclock_01(StepNr,Total),0> translate<0.5*b+vmB*Sclock_01(StepNr,Total),0,0> translate rotate} #switch(Sclock_01(StepNr,Total)) #range(2/4,4/4) object{hitbox1 rotate<0,U*2/4,0> translate<0.5*b+vmB*2/4,0,0> translate rotate} #break #end #declare A = ; #declare B = ; union{ object{ Vector( A,B, 0.06) pigment{ color rgbt<0.2,0.5,0.0,pow(Sclock_01(StepNr,Total),0.01)> } no_shadow } text { ttf "arial.ttf", "v'", 0.05, 0.0 scale 0.7 texture {FontTex4} rotate<90,18,0> translate<0.6,1,-0.8> no_shadow } translate rotate } #declare A = <-2*rP,0,Al>; #declare B = <-2*rP-1.2,0,Al>; union{ object{ Vector( A,B, 0.06) pigment{ color rgbt<0.2,0.5,0.0,pow(Sclock_01(StepNr,Total),0.01)> } no_shadow } text { ttf "arial.ttf", "v''", 0.05, 0.0 scale 0.7 texture {FontTex4} rotate<90,18,0> translate<-1.2,1,0.5*Al> no_shadow } translate rotate } #declare A = <0.5*b,h,0>; #declare B = <0.5*b,h+1.9,0>; global_settings { charset utf8 } union{ object{ Vector( A,B, 0.03) pigment{ color rgbt<0.1,0.0,0.5,pow(Sclock_01(StepNr,Total),0.01)> } no_shadow } text { ttf "arial.ttf", "\u03C9", 0.05, 0.0 scale 0.7 texture {FontTex4} rotate<60,18,0> translate<0.4,1.9,-0.2> no_shadow } translate rotate } #else #declare StepNr = StepNr +1 ; #if ( clock translate rotate} object{hitbox rotate<0,U+U*Sclock_01(StepNr,Total),0> translate<0.5*b+vmB+vmB*Sclock_01(StepNr,Total),0,0> translate rotate} #switch(Sclock_01(StepNr,Total)) #range(0,2/4) object{hitbox2 rotate<0,U*2/4,0> translate<0.5*b+vmB*2/4,0,0> translate rotate} object{hitbox1 rotate<0,U,0> translate<0.5*b+vmB,0,0> translate rotate} #break #range(2/4,4/4) object{hitbox3 rotate<0,U*2/4,0> translate<0.5*b+vmB*2/4,0,0> translate rotate} object{hitbox2 rotate<0,U,0> translate<0.5*b+vmB,0,0> translate rotate} object{hitbox1 rotate<0,U+2/4*U,0> translate<0.5*b+vmB+vmB*2/4,0,0> translate rotate} #break #end #end #end #end #end #end #end