Advertisement
Guest User

Untitled

a guest
Jun 11th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "colors.inc"  
  2. #include "shapes.inc"
  3. #include "textures.inc"  
  4.  
  5. camera {
  6.     location <10, 0, -30>
  7.     look_at  <0, 0, 0>
  8.  
  9. }  
  10.  
  11. sphere{<0,0,0>,1 hollow
  12.  texture{
  13.   pigment{gradient <0,1,0>
  14.           color_map{
  15.            [0.0 color White]
  16.            [0.8 color rgb<0.1,0.25,0.75>]
  17.            [1.0 color rgb<0.1,0.25,0.75>] }
  18.          } // end pigment
  19.   finish {ambient 1 diffuse 0}
  20.   } // end of texture
  21.  scale 10000
  22.  }
  23.  
  24. light_source {
  25.     <0, 0, -40> color White
  26. }
  27.  
  28.  
  29. plane { <0,1,0>, -25  texture {Cork scale 0.7}}  
  30.      
  31. #declare dlong = pi*(3-sqrt(5));
  32. #declare dz  = 2.0/300 ;
  33. #declare long = 0;  
  34. #declare z1  = 1 - dz/2;  
  35. #for(k,0,299)
  36.  
  37.  
  38.    #declare r = sqrt(1-z1*z1);
  39.    
  40.    #declare xpos = cos(long)*r;
  41.    #declare ypos = sin(long)*r;
  42.    #declare zpos = z1;
  43.    
  44.    sphere{<xpos,ypos,zpos> 0.1 texture{pigment {color Red}}}  
  45.    
  46.    #declare tempy = ypos;  
  47.    #declare tempx = xpos;
  48.    #declare tempz = zpos;
  49.      
  50.    #declare z1 = z1-dz ;
  51.    #declare long = long + dlong;    
  52. #end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement