POV-Ray : Newsgroups : povray.binaries.images : Point distribution on a sphere (~70k BU) Server Time
20 Nov 2024 12:43:18 EST (-0500)
  Point distribution on a sphere (~70k BU) (Message 1 to 8 of 8)  
From: Michael Andrews
Subject: Point distribution on a sphere (~70k BU)
Date: 4 Sep 2001 13:58:38
Message: <3B9517DE.3CDB49DD@reading.ac.uk>
Hi folks,

I've been thinking point sampling (the thread on focal blur set me off),
which led me to thinking about how to produce relatively evenly spaced
points on a sphere, for any number of points.

The image shows packed spheres of 80, 800 and 8000 small spheres. The
method works pretty well except at the poles themselves.

You can probably discern the method I've used from the pattern on the
large sphere on the left, but if anyone wants the code I can post it.

Bye for now,
	Mike Andrews.


Post a reply to this message


Attachments:
Download 'sphere_pack.jpg' (72 KB)

Preview of image 'sphere_pack.jpg'
sphere_pack.jpg


 

From: Greg M  Johnson
Subject: Re: Point distribution on a sphere (~70k BU)
Date: 4 Sep 2001 21:52:40
Message: <3b958568@news.povray.org>
Cool.

Michael Andrews wrote:

> You can probably discern the method I've used from the pattern on the
> large sphere on the left, but if anyone wants the code I can post it.

Stumped.
Please do, and something tells me I'll learn about the properties of a sphere
in your doing so. . .


Post a reply to this message

From: Batronyx
Subject: Re: Point distribution on a sphere (~70k BU)
Date: 5 Sep 2001 00:01:35
Message: <3b95a39f@news.povray.org>
"Michael Andrews" <M.C### [at] readingacuk> wrote in message
news:3B9517DE.3CDB49DD@reading.ac.uk...
> Hi folks,
>
> I've been thinking point sampling (the thread on focal blur set me off),
> which led me to thinking about how to produce relatively evenly spaced
> points on a sphere, for any number of points.
>
> The image shows packed spheres of 80, 800 and 8000 small spheres. The
> method works pretty well except at the poles themselves.
>
> You can probably discern the method I've used from the pattern on the
> large sphere on the left, but if anyone wants the code I can post it.
>
> Bye for now,
> Mike Andrews.

I've seen this . . . This is the pattern nature uses for packing sunflower seeds
on . . erhm .. . sunflowers. Something to do with the Fibonacci sequence and the
golden ratio. I'd be interested in seeing the code.


Post a reply to this message

From: Rick [Kitty5]
Subject: Re: Point distribution on a sphere (~70k BU)
Date: 5 Sep 2001 08:05:23
Message: <3b961503@news.povray.org>
very nice - sure post the code :)


--
Rick

Kitty5 WebDesign - http://Kitty5.com
POV-Ray News & Resources - http://Povray.co.uk
TEL : +44 (01270) 501101 - FAX : +44 (01270) 251105 - ICQ : 15776037

PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA


Post a reply to this message

From: Michael Andrews
Subject: Re: Point distribution on a sphere (~70k BU)
Date: 6 Sep 2001 04:43:47
Message: <3B9738D9.2116B639@reading.ac.uk>
"Greg M. Johnson" wrote:
> 
> Cool.
> 
> Michael Andrews wrote:
> 
> > You can probably discern the method I've used from the pattern on the
> > large sphere on the left, but if anyone wants the code I can post it.
> 
> Stumped.
> Please do, and something tells me I'll learn about the properties of a sphere
> in your doing so. . .

LOL! Sorry ... I doubt it's that earth-shattering. 

I knew I needed a nonlinear PH (latitude) change with sphere count - the
rest was trial and much error :-) 

Given f = Count/maxCount

at the North Pole PH ~ sqrt(f)
at the Equator    PH ~ f
at the South Pole PH ~ 1-sqrt(1-f)

to get constant increase of surface area with f.

PH = 180*f bunches too much at the poles and 
PH = 180*((1-f)*sqrt(f) + f*(1-sqrt(1-f))) bunches at the equator, so I
tried the linear combination 
PH = 180*(m*((1-f)*sqrt(f) + f*(1-sqrt(1-f))) + (1-m)*f) which
simplifies slightly to
PH = 180*(m*(sqrt(f)*(1-f) - f*sqrt(1-f)) + f) 
	
Further trials showed m = 1/sqrt(3) gives the best visual packing - I
haven't done any statistical checking on how good it really is, I just
went with what looks best.

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.

I'll post the code in p.t.s-f - I've cleaned it up a bit, macroed it and
tested it with v3.5 which is why this reply is so late ...

Bye for now,
	Mike Andrews.


Post a reply to this message

From: Dan Johnson
Subject: Re: Point distribution on a sphere (~70k BU)
Date: 9 Sep 2001 02:03:48
Message: <3B9B0656.16FBC0A1@hotmail.com>
Michael Andrews wrote:
> 
> Hi folks,
> 
> I've been thinking point sampling (the thread on focal blur set me off),
> which led me to thinking about how to produce relatively evenly spaced
> points on a sphere, for any number of points.
> 
> The image shows packed spheres of 80, 800 and 8000 small spheres. The
> method works pretty well except at the poles themselves.
> 
> You can probably discern the method I've used from the pattern on the
> large sphere on the left, but if anyone wants the code I can post it.
> 
> Bye for now,
>         Mike Andrews.
> 
>   ------------------------------------------------------------------------
>  [Image]
I tweaked my geodesic code to do a similar thing.  It can't do any
number of points, but it looks good.

-- 
Dan Johnson 

http://www.geocities.com/zapob


Post a reply to this message


Attachments:
Download 'manyspheres.jpg' (35 KB)

Preview of image 'manyspheres.jpg'
manyspheres.jpg


 

From: Y
Subject: Re: Point distribution on a sphere (~70k BU)
Date: 10 Sep 2001 19:00:30
Message: <3b9d460e@news.povray.org>
: You can probably discern the method I've used from the pattern on the
: large sphere on the left, but if anyone wants the code I can post it.
:
: Bye for now,
: Mike Andrews.

Fibonnochi, eh?
Will take a look at your code ...
these look great - thanks
--
Y


Post a reply to this message

From: Anton Sherwood
Subject: Re: Point distribution on a sphere (~70k BU)
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.