POV-Ray : Newsgroups : povray.binaries.images : Point distribution on a sphere (~70k BU) : Re: Point distribution on a sphere (~70k BU) Server Time
17 Aug 2024 18:27:12 EDT (-0400)
  Re: Point distribution on a sphere (~70k BU)  
From: Michael Andrews
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

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