// PoVRay 3.6 Scene File "real_tennis.pov" // author: Florian Simon // date: 2012/02/02 //-------------------------------------------------------------------------- #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.5 ,-3.0>*3 right x*image_width/image_height look_at <0.0 , 5.5 , 0.0> rotate y*-30} #declare Camera_0M = camera {/*ultra_wide_angle*/ angle 75 // front view location <1.0 , 1.5 ,-3.0>*3 right x*image_width/image_height look_at <0.0 , 5.5 , 0.0> rotate y*-30*(1+(((10/-30)-1)*Sclock_01(4,7)))} #declare Camera_00 = camera {/*ultra_wide_angle*/ angle 75 // front view location <1.0 , 1.5 ,-3.0>*3 right x*image_width/image_height look_at <0.0 , 5.5 , 0.0> rotate y*10} #declare Camera_1 = camera {/*ultra_wide_angle*/ angle 75 // diagonal view location <-2.0 , 2.5 ,-3.0>*3 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 ,-3.4>*2 right x*image_width/image_height look_at <0.0 , 1.0 , 0.0>} camera{Camera_0} // 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 <0.20,0.95,0.15>} normal { bumps 0.15 scale 0.025 } finish { phong 0.7 } } // end of texture } // end of plane //-------------------------------------------------------------------------- //---------------------------- objects in scene ---------------------------- //-------------------------------------------------------------------------- // equations --------------------------------------------------------------- #declare X = 3.500 ; // Abs. X translate overall #declare Y = 0.000 ; // Abs. Y translate overall #declare Z = 4.600 ; // Abs. Z translate overall #declare XR = -090 ; // Abs. X rotate overall #declare YR = 000 ; // Abs. X rotate overall #declare ZR = 010 ; // Abs. X rotate overall #declare rP = 0.25 ; // radius Tennisball #declare rR = 2.00 ; #declare l = rR ; // #declare b = 0.10 ; #declare v0 = 5.00 ; #declare v2 = -2 ; #declare s2 = v2 ; #declare vc = v0-v2 ; #declare s0 = v0 ; #declare m1 = 2.00 ; #declare m2 = 1.00 ; #declare M = m1+m2 ; #declare mT = 0.3 ; #declare J = 19/12*m1*l*l ; #declare Al = J/M/l ; #declare vmB0 = vc/(( (M/mT)+1+(M*Al*Al/J) )/2) ; #declare vmB = vmB0+v2 ; #declare Om = M*Al*vmB0/J ; #declare U = Om/(2*pi)*360 ; #declare v1 = vc-(M/mT)*vmB0+v2 ; // equations --------------------------end---------------------------------- // objects ----------------------------------------------------------------- #declare Tex= texture { pigment{ color Orange } finish { phong 1.0 reflection 0.00}} #declare Tex1= texture { pigment{ color Orange transmit 0.4 } finish { phong 1.0 reflection 0.00}} #declare Tex2= texture { pigment{ color Orange transmit 0.6 } finish { phong 1.0 reflection 0.00}} #declare Tex3= texture { pigment{ color Orange transmit 0.8 } finish { phong 1.0 reflection 0.00}} #declare Net= texture{ pigment {image_map { png "net" map_type 0 interpolate 4 } rotate <90,0,0>} scale 1.5 translate <0,0,0> } ; #declare Net1= texture{ pigment {image_map { png "net1" map_type 0 interpolate 4 } rotate <90,0,0>} scale 1.5 translate <0,0,0> } ; #declare Net2= texture{ pigment {image_map { png "net2" map_type 0 interpolate 4 } rotate <90,0,0>} scale 1.5 translate <0,0,0> } ; #declare Net3= texture{ pigment {image_map { png "net3" map_type 0 interpolate 4 } rotate <90,0,0>} scale 1.5 translate <0,0,0> } ; #declare puck = object{ sphere{ <0,0,0>, rP texture { pigment{ color rgb<1.00, 0.55, 0.00>} finish { phong 1.0 reflection 0.00} } // end of texture scale<1,1,1> rotate<0,0,0> translate<0,0,0> } } #declare racket = union{ cylinder { <0,0,-l>,<0,0,b>, b*2 texture { Tex } // end of texture scale <1,1,1> rotate<0,0,0> translate<0,0,0> } // end of cylinder ------------------------------------ sphere{ <0,0,0>, 3*b texture { pigment{ color rgb<1.00, 0.0, 0.00> } finish { phong 1.0 reflection 0.00}} translate<0,0,0> } sphere{ <0,0,-l>, 3*b texture { pigment{ color rgb<0.1, 0.1, 0.1> } finish { phong 1.0 reflection 0.00}} translate<0,0,0> } torus { rR, b rotate<0,0,0> texture { Tex } // end of texture scale <1,1,1> rotate<0,0,0> translate<0,0,rR+b> } // end of torus ------------------------------- cylinder { <0,-0.001,0>,<0,0.001,0>, rR texture { Net } // end of texture scale <1,1,1> rotate<0,0,0> translate<0,0,rR+b> } // end of cylinder ------------------------------------ rotate<0,0,90> translate<0,0,0> } #declare racket1 = union{ cylinder { <0,0,-l>,<0,0,b>, b*2 texture { Tex1 } // end of texture scale <1,1,1> rotate<0,0,0> translate<0,0,0> } // end of cylinder ------------------------------------ sphere{ <0,0,0>, 3*b texture { pigment{ color rgb<1.00, 0.0, 0.00> transmit 0.4 } finish { phong 1.0 reflection 0.00}} translate<0,0,0> } sphere{ <0,0,-l>, 3*b texture { pigment{ color rgb<0.1, 0.1, 0.1> transmit 0.4 } finish { phong 1.0 reflection 0.00}} translate<0,0,0> } torus { rR, b rotate<0,0,0> texture { Tex1 } // end of texture scale <1,1,1> rotate<0,0,0> translate<0,0,rR+b> } // end of torus ------------------------------- rotate<0,0,90> translate<0,0,0> no_shadow} #declare racket2 = union{ cylinder { <0,0,-l>,<0,0,b>, b*2 texture { Tex2 } // end of texture scale <1,1,1> rotate<0,0,0> translate<0,0,0> } // end of cylinder ------------------------------------ sphere{ <0,0,0>, 3*b texture { pigment{ color rgb<1.00, 0.0, 0.00> transmit 0.6 } finish { phong 1.0 reflection 0.00}} translate<0,0,0> } sphere{ <0,0,-l>, 3*b texture { pigment{ color rgb<0.1, 0.1, 0.1> transmit 0.6 } finish { phong 1.0 reflection 0.00}} translate<0,0,0> } torus { rR, b rotate<0,0,0> texture { Tex2 } // end of texture scale <1,1,1> rotate<0,0,0> translate<0,0,rR+b> } // end of torus ------------------------------- rotate<0,0,90> translate<0,0,0> no_shadow} #declare racket3 = union{ cylinder { <0,0,-l>,<0,0,b>, b*2 texture { Tex3 } // end of texture scale <1,1,1> rotate<0,0,0> translate<0,0,0> } // end of cylinder ------------------------------------ sphere{ <0,0,0>, 3*b texture { pigment{ color rgb<1.00, 0.0, 0.00> transmit 0.8 } finish { phong 1.0 reflection 0.00}} translate<0,0,0> } sphere{ <0,0,-l>, 3*b texture { pigment{ color rgb<0.1, 0.1, 0.1> transmit 0.8 } finish { phong 1.0 reflection 0.00}} translate<0,0,0> } torus { rR, b rotate<0,0,0> texture { Tex3 } // end of texture scale <1,1,1> rotate<0,0,0> translate<0,0,rR+b> } // end of torus ------------------------------- rotate<0,0,90> translate<0,0,0> no_shadow} // objects -----------------------------end--------------------------------- //---------------------------------------------------------------------------------------// //---------------------------------------------------------------------------------------// #declare Fence_Post_Texture = texture { pigment{ color rgb< 1, 1, 1>*0.9 } // normal { bumps 0.5 scale 0.05 } finish { phong 1} } // end of texture //---------------------------------------------------------------------------------------// #include "Wire_Netting_Fence_10.inc" // a wire netting fence //------------------------------------- //global_settings { max_trace_level 10 }//(1...256) [default = 5] //---------------------------------------------------------------------------------------// object{ Wire_Netting_Fence_10( 6.00, // Fence_Width_X, // width of fence in x direction 1.30, // Fence_Heigth_Y,// width of fence in y direction 0.079, // Wire_Net_Width, // net width 0.08, // Wire_Net_Radius, // <1,1,1>*0.2, // Wire_Color // color of the wire 0.04, // Fence_Post___Radius, // Zaunpfahl Fence_Post_Texture // ) //-------------------------------------------------------// scale <1,1,1>*3 rotate<0,85,0> translate<-1.50,0.00, 6.00>} //---------------------------------------------------------------------------------------// //---------------------------------------------------------------------------------------// #declare Total=7 ; #declare StepNr=1 ; #if ( clock translate rotate} object{racket translate<-s2+v2*Sclock_01(StepNr,Total),0,0> translate rotate} #else #declare StepNr = StepNr +1 ; #if ( clock translate rotate} object{racket rotate<0,U*Sclock_01(StepNr,Total),0> translate<0.5*b+vmB*Sclock_01(StepNr,Total),0,0> translate rotate} #else #declare StepNr = StepNr +1 ; #if ( clock translate rotate} object{racket rotate<0,U+U*Sclock_01(StepNr,Total),0> translate<0.5*b+vmB+vmB*Sclock_01(StepNr,Total),0,0> translate rotate} #else #declare StepNr = StepNr +1 ; camera{Camera_0M} #if ( clock translate rotate} object{racket translate<-s2,0,0> translate rotate} #else camera{Camera_00} #declare StepNr = StepNr +1 ; #if ( clock translate rotate} object{racket translate<0.5*b-s2+v2*Sclock_01(StepNr,Total),0,0> translate rotate} object{racket1 translate<0.5*b-s2,0,0> translate rotate} #switch(Sclock_01(StepNr,Total)) #range(2/4,4/4) object{racket1 rotate<0,0,0> translate<0.5*b-s2+v2*2/4,0,0> translate rotate} object{racket2 translate<0.5*b-s2,0,0> translate rotate} #break #end #else #declare StepNr = StepNr +1 ; #if ( clock translate rotate} object{racket 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(0,2/4) object{racket3 translate<0.5*b-s2,0,0> translate rotate} object{racket2 rotate<0,0,0> translate<0.5*b-s2+v2*2/4,0,0> translate rotate} object{racket1 rotate<0,0,0> translate<0.5*b,0,0> translate rotate} #break #range(2/4,4/4) object{racket3 rotate<0,0,0> translate<0.5*b-s2+v2*2/4,0,0> translate rotate} object{racket2 rotate<0,0,0> translate<0.5*b,0,0> translate rotate} object{racket1 rotate<0,U*2/4,0> translate<0.5*b+vmB*2/4,0,0> translate rotate} #break #end #else #declare StepNr = StepNr +1 ; #if ( clock translate rotate} object{racket 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{racket3 rotate<0,0,0> translate<0.5*b,0,0> translate rotate} object{racket2 rotate<0,U*2/4,0> translate<0.5*b+vmB*2/4,0,0> translate rotate} object{racket1 rotate<0,U,0> translate<0.5*b+vmB,0,0> translate rotate} #break #range(2/4,4/4) object{racket3 rotate<0,U*2/4,0> translate<0.5*b+vmB*2/4,0,0> translate rotate} object{racket2 rotate<0,U,0> translate<0.5*b+vmB,0,0> translate rotate} object{racket1 rotate<0,U+U*2/4,0> translate<0.5*b+vmB+vmB*2/4,0,0> translate rotate} #break #end #end #end #end #end #end #end #end