POV-Ray : Newsgroups : povray.binaries.images : Point distribution on a sphere (~70k BU) : Re: Point distribution on a sphere (~70k BU) Server Time
20 Nov 2024 10:19:37 EST (-0500)
  Re: Point distribution on a sphere (~70k BU)  
From: Anton Sherwood
Date: 1 Dec 2001 20:15:59
Message: <3C09829B.D8D6EDA7@pobox.com>
Michael Andrews wrote:
> I knew I needed a nonlinear PH (latitude) change with sphere count - the
> rest was trial and much error :-)
	[...]
> If anyone can come up with a true analytical function for how PH should
> change with f to give a constant change in the integrated surface area
> of the sphere cap from the pole to the current angle, I would love to
> see it.

The answer is in the Archimedean cylinder theorem.  Consider
	sphere { <0,0,0>, 1 }
	cylinder { -y, y, 1 }
Given two planes perpendicular to y, both of which cut the sphere, the
area they bound on the sphere is equal to the area they bound on the
cylinder!  (This is the basis of "Peters projection" equal-area maps.)

Thus 

        #declare Theta = 0;
        #declare H = (N-1)/N;
        #while (H >= -1)
        #declare Phi = degrees(acos(H));
        sphere { <0,R,0>, Size
                rotate <Phi, Theta, 0>
                }
        #declare H = H - 2/N;
        #declare Theta = mod (Theta + 137.5077641, 360);
        #end

(see http://www.ogre.nu/doodle.html )


Another approach (Saff & Kuijlaars) roughly equates the distance between
nuclei along the spiral to the distance between turns of the spiral.

        #declare Theta = 0;
        #declare Factor = degrees(sqrt(4*pi/N));
        #declare H = (N-1)/N;
        #while (H >= -1)
        #declare Phi = degrees(acos(H));
        #declare Theta = mod (Theta + Factor/sqrt(1-H*H), 360);
        sphere { <0,R,0>, Size
                rotate <Phi, Theta, 0>
                }
        #declare H = H - 2/N;
        #end

I adapted this code from
http://www.math.niu.edu/~rusin/known-math/97/spherefaq
(which confuses phi with theta); found through
http://www.math.niu.edu/~rusin/known-math/index/spheres.html


-- 
Anton Sherwood  --  http://www.ogre.nu/


Post a reply to this message

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