POV-Ray : Newsgroups : povray.binaries.images : When in need of room lighting, use a lamp : Re: When in need of room lighting, use a lamp Server Time
20 Nov 2024 00:45:40 EST (-0500)
  Re: When in need of room lighting, use a lamp  
From: Greg M  Johnson
Date: 19 Oct 2001 12:02:38
Message: <3BD04E6D.27590CD2@aol.com>
It was not invented by me and I apologize that I forgot who did it.

#declare Gball = union{
        //sphere { 0, 1 }
        #declare N = 150;               //arbitrary 150422;
        #declare nn = 0;               //arbitrary 150422;
        #declare R = 1/sqrt(N); //also arbitrary
        #declare Theta = 0;
//        #declare H = (N-1)/N;   //I dunno which of these makes a better
pattern.
      #declare H = 1;                 //There's a logical argument for either.
        #while (H >= -1)
                #declare Phi = degrees(acos(H));

                sphere { <0,1,0>, R*2
                        rotate <Phi, Theta, 0>
                        inverse
                pigment{color rgb nn/150}
                finish{reflection 0.2}
                        }
                #declare H = H - 2/N;
                #declare Theta = mod (Theta + 137.5077641, 360);
                #declare nn=nn+1;
        #end
        texture {Tex_2 }
        }


#object {Gball
        rotate <0,0,0>
        translate <3,0,3>}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.