Advertisement
Guest User

relative motion

a guest
Aug 17th, 2018
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. This file has 2 parts. The first part is the ini file for the animation, the second part (named turntable.pov) is the actual code to render each frame.
  2. This is used with POVray 3.7, and to produce the animation you run the ini file and then combine the frames produced to produce an animation, such as with imagemagick.
  3.  
  4. The main file has several options.
  5. Each option when disabled starts with "/*". To enable that, remove the "/*".
  6. Each option ends with "// */"
  7. The most obvious ones are either a stationary sun or a circling sun, and to go with them a point below the edge camera which is either circling below as the turntable rotates or stationary.
  8.  
  9. Additionally there are several choices of cameras. There is the option of one at the centre or the edge of the turntable, and this can be either rotating with the turntable (circling for the edge one) or stationary.
  10. Additionally, they can be counterrotated to counter the rotation of the turntable or the circling of the sun.
  11.  
  12. Finally there are some extra points which are common which is a point below the central camera and a light source, and some math to position things.
  13.  
  14. For the math based section, in the animation file, the initial and final clock represent the range of motion which should be left at 0 and 360. The final frame indicates the number of frames the animation has, if you would like a smoother animation with more frames, increase this.
  15.  
  16. For turntable.pov, the options are:
  17. r - radius of turntable.
  18. R - distance to object (sun).
  19.  
  20. Sr - size of the sun.
  21. Cr - size of the small ball to represent the position of the cameras.
  22.  
  23. --.ini--
  24.  
  25. Antialias=Off
  26. Antialias_Threshold=0.1
  27. Antialias_Depth=2
  28.  
  29. Input_File_Name="turntable.pov"
  30.  
  31. Initial_Frame=1
  32. Final_Frame=360
  33. Initial_Clock=0
  34. Final_Clock=360
  35.  
  36. Cyclic_Animation=on
  37. Pause_when_Done=off
  38.  
  39. --turntable.pov--
  40. #version 3.7;
  41. global_settings {  assumed_gamma 1.0 }
  42.                    
  43. #declare r=6.4;
  44. #declare R=150000;
  45. //#declare r=6.4;
  46. //#declare R=150000;
  47.  
  48. #declare theta=clock;
  49. #declare trad=radians(theta);
  50. #declare st=sin(trad);
  51. #declare ct=cos(trad);
  52.  
  53. #declare Sr=1000;
  54.  
  55. #declare Cr=0.05;
  56.  
  57.  
  58. //Central rotating camera
  59. camera{ angle 90
  60.     right x*image_width/image_height
  61.     location  <0 , 0 , 0>
  62.     look_at   <ct , 0 , st>
  63. }// */
  64.  
  65. /*//Edge circling camera
  66. camera{ angle 90
  67.     right x*image_width/image_height
  68.     location  <r*ct , 0 , r*st>
  69.     look_at   <(r+1)*ct , 0 , (r+1)*st>
  70. }// */
  71.  
  72. /*//Edge circling, counterrotating camera
  73. camera{ angle 90
  74.     right x*image_width/image_height
  75.     location  <r*ct , 0 , r*st>
  76.     look_at   <r*ct+1 , 0 , r*st>
  77. }// */
  78.  
  79. /*//Central, stationry camera
  80. camera{ angle 90
  81.     right x*image_width/image_height
  82.     location  <0 , 0 , 0>
  83.     look_at   <1 , 0 , 0>
  84. }// */
  85.  
  86. /*//Edge stationary camera
  87. camera{ angle 90
  88.     right x*image_width/image_height
  89.     location  <r , 0 , 0>
  90.     look_at   <r+1 , 0 , 0>
  91. }// */
  92.  
  93. /*//Central counterrotating camera
  94. camera{ angle 90
  95.     right x*image_width/image_height
  96.     location  <0 , 0 , 0>
  97.     look_at   <ct , 0 , -st>
  98. }// */
  99.  
  100. /*//Edge counterrotating camera
  101. camera{ angle 90
  102.     right x*image_width/image_height
  103.     location  <r , 0 , 0>
  104.     look_at   <r+ct , 0 , -st>
  105. }// */
  106.        
  107.        
  108. //Lights
  109. light_source{ <0,0,0>
  110.     color rgb<1,1,1>
  111. }
  112.      
  113.              
  114. //Stationary sun
  115. sphere{ <R , 0 , 0>, Sr
  116.     texture { pigment{ rgb<1,1,0> }
  117.         finish { diffuse 0.9
  118.             phong 1}
  119.     }
  120. }// */
  121.              
  122. /*//Circling sun
  123. sphere{ <R*ct , 0 , -R*st>, Sr
  124.     texture { pigment{ rgb<1,1,0> }
  125.         finish { diffuse 0.9
  126.             phong 1}
  127.     }
  128. }// */
  129.  
  130.  
  131. // Point below circling near camera:
  132. sphere{ <r*ct,-1,r*st>, Cr
  133.     texture { pigment{ rgb<0,1,0> }
  134.     }
  135. }// */
  136.  
  137. /*// Point below stationary near camera:
  138. sphere{ <r,-1,0>, Cr
  139.     texture { pigment{ rgb<0,1,0> }
  140.     }
  141. }// */
  142.  
  143. // Point below central camera:
  144. sphere{ <0,-1,0>, Cr
  145.     texture { pigment{ rgb<0,1,0> }
  146.     }
  147. }//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement