Advertisement
agnishom

Curves.pov

Feb 1st, 2013
2,577
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #declare e = 2.71828;
  2. #include "textures.inc"
  3. #include "colors.inc"
  4. #include "glass.inc"
  5. camera {
  6. location <0, 0, -10>
  7. look_at <0,0,0>
  8. }
  9. light_source
  10. {
  11. <0,0,-10>
  12. color rgb <1.0, 1.0, 1.0>
  13. shadowless
  14. spotlight
  15. rotate y*clock*-100
  16. }
  17. #declare Ball =
  18.   sphere{<0,0,0>,0.08
  19.     texture{
  20.       pigment{color rgb<1,0.8,0>}
  21.       finish {diffuse 0.9 phong 1}
  22.     }// end of texture
  23.   }// end of sphere
  24.  
  25. //------------------------------------
  26. #declare X = -5;    // start value X
  27. #declare EndX = 5;  //   end value X
  28. #declare Step = 0.001;// step value
  29. #declare Sine =
  30. union{
  31. #while ( X < EndX + Step)//loop start
  32.   object{ Ball translate <X,sin(X),0>}
  33.  
  34. #declare X = X + Step; // next X
  35. #end // ------------------- loop end
  36. };
  37. #declare X = -5;    // start value X
  38. #declare EndX = 5;  //   end value X
  39. #declare Step = 0.001;// step value
  40. #declare Curvedd =
  41. union{
  42. #while ( X < EndX + Step)//loop start
  43.   object{ Ball pigment {color rgb<0,0,1>} translate <X,cos(X)+cos(pow(X,2)),0>}
  44.  
  45. #declare X = X + Step; // next X
  46. #end // ------------------- loop end
  47. };
  48.  
  49. #declare X = 0;    // start value X
  50. #declare EndX = 6.28;  //   end value X
  51. #declare Step = 0.001;// step value
  52. #declare Cardioid =
  53. union{
  54. #while ( X < EndX + Step)//loop start
  55.   #declare r = 1 - sin(X);
  56.   object{ Ball pigment {color rgb<0,1,0>} translate <r*cos(X),r*sin(X),0>}
  57.  
  58. #declare X = X + Step; // next X
  59. #end}; // ------------------- loop end  
  60.  
  61. #declare X = 0;    // start value X
  62. #declare EndX = 6.28;  //   end value X
  63. #declare Step = 0.001;// step value
  64. #declare Butterfly =
  65. union{
  66. #while ( X < EndX + Step)//loop start
  67.   #declare r = pow(e,sin(X)) - 2*cos(4*X) + pow(sin((2*X-pi)/24),5);
  68.   object{ Ball texture{Polished_Brass} translate <r*cos(X),r*sin(X),0>}
  69.  
  70. #declare X = X + Step; // next X
  71. #end}; // ------------------- loop end
  72.  
  73. #declare X = -6.28;    // start value X
  74. #declare EndX = 6.28*2
  75. ;  //   end value X
  76. #declare Step = 0.001;// step value
  77. #declare log_spiral =
  78. union{
  79. #while ( X < EndX + Step)//loop start
  80.   #declare b = log(1.61803397)/(3.14159/2);
  81.   #declare r = 1*pow(e,b*X);
  82.   object{ Ball texture{Gold_Metal} translate <r*cos(X),r*sin(X),0>}
  83.  
  84. #declare X = X + Step; // next X
  85. #end}; // ------------------- loop end
  86.  
  87.  
  88. #declare X = -6.28;    // start value X
  89. #declare EndX = 6.28
  90. ;  //   end value X
  91. #declare Step = 0.001;// step value
  92. #declare Fermat_spiral =
  93. union{
  94. #while ( X < EndX + Step)//loop start
  95.   #declare r = pow(X,0.5);
  96.   object{ Ball texture{Polished_Brass} translate <r*cos(X),r*sin(X),0>}
  97.   #declare r = -1*pow(X,0.5);
  98.   object{ Ball texture{Polished_Brass} translate <r*cos(X),r*sin(X),0>}
  99. #declare X = X + Step; // next X
  100. #end}; // ------------------- loop end
  101.  
  102. /*object {Butterfly texture{Jade}}
  103. object {Cardioid}
  104. object {Sine}
  105. object {Curvedd}
  106. object {Fermat_spiral} */
  107. object {log_spiral}
  108.  
  109.  
  110. sphere{ <0,0,0>, 1
  111.         texture{T_Glass3
  112.                } // end of texture
  113.         interior
  114.         {I_Glass_Fade_Sqr1}
  115.         finish
  116.         {F_Glass1}
  117.         scale 100
  118.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement