Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ; use with the following .ini-file
- ; POV-Ray animation ini file
- Antialias=On
- Antialias_Threshold=0.1
- Antialias_Depth=2
- Input_File_Name="20200131_animated_sine.pov" ; change if needed
- Initial_Frame=1
- Final_Frame=600
- Initial_Clock=0
- Final_Clock=3.375
- Cyclic_Animation=off
- Pause_when_Done=off
- ;convert -density 300 -delay 4 -loop 0 20200131_animated_sine*.png animated.gif
- ;ffmpeg -r 10 -i 20200131_animated_sine%03d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p out2.mp4
- ;ffmpeg -framerate 30 -pattern_type glob -i '*.png' -c:v libx264 -pix_fmt yuv420p out.mp4
- */
- // PoVRay 3.7 Scene File " ... .pov"
- // author: ...
- // date: ...
- //------------------------------------------------------------------------
- #version 3.7;
- global_settings{ assumed_gamma 1.0 }
- #default{ finish{ ambient 0.1 diffuse 0.9 }}
- //------------------------------------------------------------------------
- #include "colors.inc"
- #include "colours_x11.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"
- #declare start_zrot = 1.0;
- #declare stop_zrot = 1.5;
- #declare start_xrot = 1.8;
- #declare stop_xrot = 1.9;
- //------------------------------------------------------------------------ right handed Coordinate system z up
- #declare Camera_0 = camera {/*ultra_wide_angle*/ angle 55 // front view from x+
- sky z
- location <10.0 , 0.0 , 1.0>
- right -x*image_width/image_height
- look_at <0.0 , 0.0 , 1.0>}
- #declare Camera_1 = camera {/*ultra_wide_angle*/ angle 14 // diagonal view
- sky z
- right -x*image_width/image_height
- location <20.0,-20.0, 12.0 >
- look_at <0.0 , 0 , 1.2> }
- #declare Camera_2 = camera {/*ultra_wide_angle*/ angle 55 //right side view from y-
- sky z
- location <0.0 ,-10.0 , 1.0>
- right -x*image_width/image_height
- look_at <0.0 , 0.0 , 1.0>}
- #declare Camera_3 = camera {/*ultra_wide_angle*/ angle 65 // top view from z- (x right y up )
- sky z
- location < 0,-0.001, 10>
- right -x*image_width/image_height
- look_at <0.0 , 0.0 , 1.0>}
- #declare Camera_4 = camera {/*ultra_wide_angle*/ angle 14 // diagonal view
- sky z
- right -x*image_width/image_height
- location <20.0,-20.0, 12.0 >
- look_at <3.5 , 0 , 1.2> }
- #declare Camera_5 = camera { // front view
- orthographic
- sky z
- right <10,0,0>
- up <0,0,6>
- location <3.5,-20.0, 0.0 >
- look_at <3.5 , 0 , 0.0> }
- #declare Camera_6 = camera { // front view
- orthographic
- sky z
- right <800,0,0>*0.012
- up <0,0,600>*0.012
- location <3.5,-20.0, 0.0 >
- look_at <3.5 , 0 , 0.0>
- #switch(clock)
- #range(0,start_zrot)
- rotate <0,0,0>
- #break
- #range(start_zrot,stop_zrot)
- translate<-3.5*(clock-start_zrot)/(stop_zrot-start_zrot),0,0>
- rotate <0,0,-90*(clock-start_zrot)/(stop_zrot-start_zrot)>
- #break
- #range(stop_zrot,start_xrot)
- translate<-3.5,0,0>
- rotate <0,0,-90>
- #break
- #range(start_xrot,stop_xrot)
- translate<-3.5,0,0>
- rotate <0,0,-90>
- rotate <-90*(clock-start_xrot)/(stop_xrot-start_xrot),0,0>
- #break
- #else
- translate<-3.5,0,0>
- rotate <0,0,-90>
- rotate <-90,0,0>
- #end
- }
- #declare Camera_7 = camera { // front view
- orthographic
- sky z
- right <800,0,0>*0.012
- up <0,0,600>*0.012
- #switch(clock)
- #range(0,start_zrot)
- location <3.5,-20.0, 0.0 >
- #break
- #range(start_zrot,stop_zrot)
- location <3.5,-20.0, 10.0*(1-pow((clock-(start_zrot+stop_zrot)/2.0)/((stop_zrot-start_zrot)/2.0),2)) >
- #break
- #else
- location <3.5,-20.0, 0.0 >
- #end
- look_at <3.5 , 0 , 0.0>
- #switch(clock)
- #range(0,start_zrot)
- rotate <0,0,0>
- #break
- #range(start_zrot,stop_zrot)
- translate<-3.5*(clock-start_zrot)/(stop_zrot-start_zrot),0,0>
- rotate <0,0,-90*(clock-start_zrot)/(stop_zrot-start_zrot)>
- #break
- #range(stop_zrot,start_xrot)
- translate<-3.5,0,0>
- rotate <0,0,-90>
- #break
- #range(start_xrot,stop_xrot)
- translate<-3.5,0,0>
- rotate <0,0,-90>
- rotate <-90*(clock-start_xrot)/(stop_xrot-start_xrot),0,0>
- #break
- #else
- translate<-3.5,0,0>
- rotate <0,0,-90>
- rotate <-90,0,0>
- #end
- }
- camera{Camera_7}
- //------------------------------------------------------------------------
- // sun -------------------------------------------------------------------
- light_source{<-1500,+2500, 1500> color White}
- light_source{<-1500,-2500, 1500> color White}
- // sky -------------------------------------------------------------------
- sky_sphere{ pigment{ gradient <0,0,1>
- color_map{ [0 color rgb<1,1,1> ]//White
- [0.2 color rgb<0.20,0.30,0.56>*0.9]//~Navy
- [0.8 color rgb<0.20,0.30,0.56>*0.9]//~Navy
- [1.0 color rgb<1,1,1> ]//White
- }
- scale 2 }
- } // end of sky_sphere
- //------------------------------------------------------------------------
- //------------------------------ the Axes --------------------------------
- //------------------------------------------------------------------------
- #macro Axis_( AxisLenN, AxisLenP, Dark_Texture,Light_Texture)
- union{
- cylinder { <0,0,-AxisLenN>,<0,0,AxisLenP>,0.05
- texture{checker texture{Dark_Texture }
- texture{Light_Texture}
- translate<0.0,0,0.0>}
- }
- cone{<0,0,0>,0.2,<0,0,0.7>,0 translate<0,0, AxisLenP>
- texture{Dark_Texture}
- }
- } // end of union
- #end // of macro "Axis()"
- //------------------------------------------------------------------------
- #macro arrow( arrowLength, arrowDia, arrowColor)
- union
- {
- cylinder
- {
- <0,0,0>, <0,0,arrowLength-1.5*arrowDia>, arrowDia/2
- texture{ pigment{arrowColor} }
- }
- cone
- {
- <0,0,0>,arrowDia,<0,0,1.5*arrowDia>,0 translate<0,0,arrowLength-1.5*arrowDia>
- texture{ pigment{arrowColor} }
- }
- }
- #end
- //------------------------------------------------------------------------
- #macro AxisXYZ( AxisLenXn,AxisLenXp, AxisLenYn, AxisLenYp, AxisLenZn, AxisLenZp, Tex_Dark, Tex_Light)
- //--------------------- drawing of 3 Axes --------------------------------
- union{
- object { Axis_(AxisLenXn,AxisLenXp, Tex_Dark, Tex_Light) rotate< 0,90, 0>}// x-Axis
- object { Axis_(AxisLenYn,AxisLenYp, Tex_Dark, Tex_Light) rotate< 0,0, 0>}// y-Axis
- object { Axis_(AxisLenZn,AxisLenZp, Tex_Dark, Tex_Light) rotate<-90,0, 0>}// z-Axis
- } // end of union
- #end// of macro "AxisXYZ( ... )"
- //------------------------------------------------------------------------
- #declare Texture_Text = texture {
- pigment{ color rgb<0,0,1> }
- finish { phong 1}
- }
- #declare Texture_A_Dark = texture {
- pigment{ color rgb<1,0.40,0> }
- finish { phong 1}
- }
- #declare Texture_A_Light = texture {
- pigment{ color rgb<1,1,1>}
- finish { phong 1}
- }
- object{ AxisXYZ( .5,7.00, 1.5,1.5, 1.5,1.5, Texture_A_Dark, Texture_A_Light)}
- //-------------------------------------------------- end of coordinate axes
- text { ttf "arial.ttf", "U(t)", 0.005, 0
- rotate<90,0,0>
- texture{Texture_Text}
- scale 0.75
- translate <0.3,0,2>
- no_shadow
- }
- text { ttf "arial.ttf", "t", 0.005, 0
- rotate<90,0,0>
- texture{Texture_Text}
- scale 0.75
- translate <7,0,.5>
- no_shadow
- }
- text { ttf "arial.ttf", "Im(Z)", 0.005, 0
- rotate<0,-90,0>
- texture{Texture_Text}
- scale 0.75
- translate<0,0,0>
- #switch(clock)
- #range(0,start_xrot)
- rotate <90,0,0>
- #break
- #range(start_xrot,stop_xrot)
- rotate <90-90*(clock-start_xrot)/(stop_xrot-start_xrot),0,0>
- #break
- #else
- #end
- translate <0,2.7,.2>
- no_shadow
- }
- text { ttf "arial.ttf", "Re(Z)", 0.005, 0
- rotate<0,-90,0>
- texture{Texture_Text}
- scale 0.75
- #switch(clock)
- #range(0,start_xrot)
- rotate <90,0,0>
- #break
- #range(start_xrot,stop_xrot)
- rotate <90-90*(clock-start_xrot)/(stop_xrot-start_xrot),0,0>
- #break
- #else
- #end
- translate <0,0.2,2.2>
- no_shadow
- }
- //--------------------------------------------------------------------------
- //---------------------------- objects in scene ----------------------------
- //--------------------------------------------------------------------------
- torus {
- 1, .01 // major and minor radius
- rotate <0,0,90> // so we can see it from the top
- pigment { Black }
- translate<3*clock,0,0>
- }
- #for (cl, 0, clock, 1/200)
- sphere { <0,0,0>, 0.025
- texture { pigment{ color Red } // rgb< 1, 0.0, 0.0>}
- finish { phong 1 reflection 0.00}
- } // end of texture
- scale<1,1,1>
- translate<0,-1,0>
- rotate<-360*cl,0,0>
- translate<3*cl,0,0>
- } // end of sphere -----------------------------------
- #end
- sphere { <0,0,0>, 0.1
- texture { pigment{ color Red } // rgb< 1, 0.0, 0.0>}
- finish { phong 1 reflection 0.00}
- } // end of texture
- scale<1,1,1>
- translate<0,-1,0>
- rotate<-360*clock,0,0>
- translate<3*clock,0,0>
- } // end of sphere -----------------------------------
- #switch(clock)
- #range(2.25,10)
- cylinder { <-.1,0,0>,<-.1,0,sin(2*pi*clock)+1e-6>,0.04
- texture { pigment { color Blue2 }}
- }
- cylinder { <-.1,0,sin(2*pi*clock)+1e-6>,<-.1,-cos(2*pi*clock)+1e-6,sin(2*pi*clock)+1e-6>,0.025
- texture { pigment { color Chartreuse4 }}
- }
- cylinder { <-.1,0,0>,<-.1,-cos(2*pi*clock),sin(2*pi*clock)>,0.025
- texture { pigment { color Red }}
- }
- #switch(clock)
- #range(2.25,2.75)
- #for (cl, 2.25, clock, 1/200)
- sphere
- {
- <0,0,0>, 0.025
- texture
- {
- pigment{ color Magenta4 }
- finish { phong 1 reflection 0.00}
- }
- translate<-0.1,-.66,0>
- rotate<-360*cl,0,0>
- }
- #end
- #break
- #range(2.75,3.25)
- #for (cl, clock, 3.25, 1/200)
- sphere
- {
- <0,0,0>, 0.025
- texture
- {
- pigment{ color Magenta4 }
- finish { phong 1 reflection 0.00}
- }
- translate<-0.1,-.66,0>
- rotate<-360*cl,0,0>
- }
- #end
- #break
- #else
- #for (cl, 3.25, clock, 1/200)
- sphere
- {
- <0,0,0>, 0.025
- texture
- {
- pigment{ color Magenta4 }
- finish { phong 1 reflection 0.00}
- }
- translate<-0.1,-.66,0>
- rotate<-360*cl,0,0>
- }
- #end
- #end
- #break
- #else
- #end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement