POV-Ray : Newsgroups : povray.advanced-users : How to distribute points equally on sqhere surface? Server Time
2 Nov 2024 17:19:47 EDT (-0400)
  How to distribute points equally on sqhere surface? (Message 1 to 10 of 22)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Peter Santo
Subject: How to distribute points equally on sqhere surface?
Date: 1 Jun 1999 00:50:23
Message: <37535875.1B1F229E@pool.informatik.rwth-aachen.de>
Hello!

I would like to render a sphere with an arbitrary number of points (or
smaller spheres) on its surface that I want to distribute equally (so
the distance to the neighbouring points is nearly equal for every
point). I suppose there is no perfect solution for that problem, but I
would like to approximate it as good as possible.

A funktion could look like this:
Input: Number of points (n)
Output: n pairs of angles (horizontal and vertical from sphere's center)
that describe the location of the points. (alternatively <x,y,z>-coords
on the surface)

Of course, the solution is easy for n = 1(trivial), 2(line),
3(traingle), 4(tetrahedron), 6(octahedron), 8(cube) and some more. I
also checked http://www.cris.com/~rjbono/html/domes.html , but geodesic
domes always have a "magic" number of corners.

Does anyone have an idea for this? Any help would be appreciated (also
"It does not work, because..").

/PETER/

-- 
Peter Santo (PUMP development)
Visit: http://www.ieee.rwth-aachen.de/mp3/


Post a reply to this message

From: Jerry Anning
Subject: Re: How to distribute points equally on sqhere surface?
Date: 1 Jun 1999 00:58:32
Message: <375359b5.979098@news.povray.org>
On Tue, 01 Jun 1999 05:50:13 +0200, Peter Santo
<san### [at] poolinformatikrwth-aachende> wrote:


>I would like to render a sphere with an arbitrary number of points (or
>smaller spheres) on its surface that I want to distribute equally (so
>the distance to the neighbouring points is nearly equal for every
>point). I suppose there is no perfect solution for that problem, but I
>would like to approximate it as good as possible.
>
>A funktion could look like this:
>Input: Number of points (n)
>Output: n pairs of angles (horizontal and vertical from sphere's center)
>that describe the location of the points. (alternatively <x,y,z>-coords
>on the surface)
>
>Of course, the solution is easy for n = 1(trivial), 2(line),
>3(traingle), 4(tetrahedron), 6(octahedron), 8(cube) and some more. I
>also checked http://www.cris.com/~rjbono/html/domes.html , but geodesic
>domes always have a "magic" number of corners.
>
>Does anyone have an idea for this? Any help would be appreciated (also
>"It does not work, because..").

The question is tricky because "equal distribution" on a sphere turns
out not to be really well defined.  Nonetheless, there are solutions.
The FAQ for the group comp.graphics.algorithms has pointers to several
discussions and even specific point sets for many numbers.  If you
can't find the stuff referenced by the FAQ, email me and I will send
you some tech info and point sets.

Jerry Anning
clem "at" dhol "dot" com


Post a reply to this message

From: TonyB
Subject: Re: How to distribute points equally on sqhere surface?
Date: 1 Jun 1999 00:59:46
Message: <37534D28.1187A9F2@panama.phoenix.net>
I long ago brought to this group an excellent link for all this kinds of
info. Here is the link to the specific subject you request information
about:

http://www.mhri.edu.au/~pdb/geometry/spherepoints/

Good luck.

--
Anthony L. Bennett
http://welcome.to/TonyB

Graphics rendered
by the Dreamachine.


Post a reply to this message

From: Peter Popov
Subject: Re: How to distribute points equally on sqhere surface?
Date: 1 Jun 1999 02:28:35
Message: <37536de1.24675844@news.povray.org>
On Tue, 01 Jun 1999 05:50:13 +0200, Peter Santo
<san### [at] poolinformatikrwth-aachende> wrote:

>Hello!
>
>I would like to render a sphere with an arbitrary number of points (or
>smaller spheres) on its surface that I want to distribute equally (so
>the distance to the neighbouring points is nearly equal for every
>point). I suppose there is no perfect solution for that problem, but I
>would like to approximate it as good as possible.
>
>/PETER/

Let the points repel each other. Restrict their movement to the
surface of the sphere. Place them randomly (for ex. x=rand(),
y=rand(), z = sqrt(1-x*x-y*y) ). Start to calculate theit movement due
to repulsive forces. Stop when the velocity of the currently fastest
point does not exceed 4*pi*r/NumberOfPoints [in SpaceUnits per
TimeUnits] or some other preset value. return();

Hope this helps.
---------
Peter Popov
ICQ: 15002700


Post a reply to this message

From: Anders Haglund
Subject: RE: How to distribute points equally on sqhere surface?
Date: 1 Jun 1999 08:49:47
Message: <3753c8db.0@news.povray.org>
Peter Santo <san### [at] poolinformatikrwth-aachende> wrote:
> Hello!
>
> I would like to render a sphere with an arbitrary number of points (or
> smaller spheres) on its surface that I want to distribute equally (so
> the distance to the neighbouring points is nearly equal for every
> point). I suppose there is no perfect solution for that problem, but I
> would like to approximate it as good as possible.
>
> A funktion could look like this:
> Input: Number of points (n)
> Output: n pairs of angles (horizontal and vertical from sphere's center)
> that describe the location of the points. (alternatively <x,y,z>-coords
> on the surface)
>
> Of course, the solution is easy for n = 1(trivial), 2(line),
> 3(traingle), 4(tetrahedron), 6(octahedron), 8(cube) and some more. I
> also checked http://www.cris.com/~rjbono/html/domes.html , but geodesic
> domes always have a "magic" number of corners.

There are only 3 solutions because when all points are equaly distributed
they will make out triangles with equaly long sides, and there only exists 3
such cases: the tetrahedron(4 sides), the octahedron(8 sides) and the
dodecaedron(20 sides). On a cube, for example, the points are not equaly
distributed. How ever there are recursive methods of finding a close
solution for any number of points, and that usualy is close enough. Two
methods are described in this page:
http://www.mhri.edu.au/~pdb/geometry/spherepoints/index.html

/Anders


Post a reply to this message

From: Remco de Korte
Subject: Re: How to distribute points equally on sqhere surface?
Date: 1 Jun 1999 11:52:18
Message: <3753AD55.3F29E7C3@xs4all.nl>
Peter Popov wrote:
> 
> On Tue, 01 Jun 1999 05:50:13 +0200, Peter Santo
> <san### [at] poolinformatikrwth-aachende> wrote:
> 
> >Hello!
> >
> >I would like to render a sphere with an arbitrary number of points (or
> >smaller spheres) on its surface that I want to distribute equally (so
> >the distance to the neighbouring points is nearly equal for every
> >point). I suppose there is no perfect solution for that problem, but I
> >would like to approximate it as good as possible.
> >
> >/PETER/
> 
> Let the points repel each other. Restrict their movement to the
> surface of the sphere. Place them randomly (for ex. x=rand(),
> y=rand(), z = sqrt(1-x*x-y*y) ). Start to calculate theit movement due
> to repulsive forces. Stop when the velocity of the currently fastest
> point does not exceed 4*pi*r/NumberOfPoints [in SpaceUnits per
> TimeUnits] or some other preset value. return();
> 
> Hope this helps.
> ---------
> Peter Popov
> ICQ: 15002700

I have been wondering about a solution for this some time ago.
I think your strategy is brilliant (in the way that it makes me say: why didn't
_I_ thin of that? ;-)) but I think POV will parse on this forever. You'll
probably need an external program to do the calculations. 
Anybody?

Remco


Post a reply to this message

From: Peter Popov
Subject: Re: How to distribute points equally on sqhere surface?
Date: 1 Jun 1999 18:09:46
Message: <37544b0d.10640263@news.povray.org>
On Tue, 01 Jun 1999 11:52:21 +0200, Remco de Korte
<rem### [at] xs4allnl> wrote:

>I have been wondering about a solution for this some time ago.
>I think your strategy is brilliant (in the way that it makes me say: why didn't
>_I_ thin of that? ;-)) but I think POV will parse on this forever. You'll
>probably need an external program to do the calculations. 
>Anybody?
>
>Remco

Nay, not mine. I think I saw it in either sci.math, sci.physics or
comp.graphics.algorithms. Check out the FAQs of those groups to find
out who the author of the algorithm is.

---------
Peter Popov
ICQ: 15002700


Post a reply to this message

From: Peter Santo
Subject: Re: How to distribute points equally on sqhere surface?
Date: 1 Jun 1999 21:46:44
Message: <37547EEA.85B82D80@pool.informatik.rwth-aachen.de>
Thank you all very much for your helpful information!

> >You'll
> >probably need an external program to do the calculations.
> >Anybody?

> Nay, not mine. I think I saw it in either sci.math, sci.physics or
> comp.graphics.algorithms. Check out the FAQs of those groups to find
> out who the author of the algorithm is.

What is wrong with the code at
http://www.mhri.edu.au/~pdb/geometry/spherepoints/ ?

> >but I think POV will parse on this forever.

Hmm, in fact, I thought about making the algorithm a little more
efficient (adaptive step size) and implementing it as a povray macro.
But maybe it is not a sensible thing to do, because you either render a
single image - then it is not worth writing lots of code. Or you render
an animation - then you do not want to spend too much time parsing.

/PETER/

-- 
Peter Santo (PUMP development)
Visit: http://www.ieee.rwth-aachen.de/mp3/


Post a reply to this message

From: Ralf Muschall
Subject: Re: How to distribute points equally on sqhere surface?
Date: 2 Jun 1999 23:59:59
Message: <3755EF79.7467C638@t-online.de>
Anders Haglund wrote:

>...
> > Of course, the solution is easy for n = 1(trivial), 2(line),
> > 3(traingle), 4(tetrahedron), 6(octahedron), 8(cube) and some more. I
> > also checked http://www.cris.com/~rjbono/html/domes.html , but geodesic
> > domes always have a "magic" number of corners.

The "optimal" solution for n=8 is not the cube, but a pair of
parallel squares rotated by 45 degrees (which is probably what
Anders means). The first thing Peter would have to decide is whether
he wants something which looks regular (e.g. platonic solids), or
something which has optimally distributed points (with respect to some
repulsive force).

The general solution to the former is probably to start with
one of the 5 platonic solids and regularly subdivide the faces
(this gives geodesic domes).
The latter requires numeric optimization (I'd say one should use
a rather complicated method, since povray is much slower than C).

> dodecaedron(20 sides). On a cube, for example, the points are not equaly
I guess you mean the icosahedron here (a dodecahedron has 12
pentagons).

Ralf


Post a reply to this message

From: Peter Santo
Subject: Re: How to distribute points equally on sqhere surface?
Date: 3 Jun 1999 05:24:00
Message: <37563B08.5CDCFCB2@pool.informatik.rwth-aachen.de>
> > > 3(traingle), 4(tetrahedron), 6(octahedron), 8(cube) and some more. I
> The "optimal" solution for n=8 is not the cube, but a pair of
> parallel squares rotated by 45 degrees (which is probably what
> Anders means).

.. and what I mean :)  : If a cube is enclosed by a sphere, it touches
the sphere's surface at 8 points.

> The first thing Peter would have to decide is whether
> he wants something which looks regular (e.g. platonic solids), or
> something which has optimally distributed points (with respect to some
> repulsive force).

I would like to be able to create both. I find the exact solution
mathematically challenging and the numerical approximation interesting
as it allows to render nice animations of rearranging points.
It all started with the plan to build a lamp with 15 small bulbs (bad
number) on a hemisphere. Since then I thought of several things to
render with such an algorithm, e.g. spikes on sphere-shaped creatures.

> The general solution to the former is probably to start with
> one of the 5 platonic solids and regularly subdivide the faces
> (this gives geodesic domes).

Does subdivision work with the cube and the dodecahedron?

Ok, with subdivision of triangles like this

      /\
     /  \
    /    \
   /______\
  / \    / \
 /   \  /   \
/_____\/_____\

..we can realize objects with the following number of verteces:

From tetrahedron :  4, 10,  34, 130,  512, ...
From octahedron  :  6, 18,  66, 258, 1026, ...
From cube        :  8, ?
From icosahedron : 12, 42, 162, 642, 2562, ... (is this correct?)
From dodecahedron: 20, ?

Bucky-ball (C60-Fulleren): 60, ?

Is there an exact solution for 5, 7 or 16 points?

/PETER/

-- 
Peter Santo (PUMP development)
Visit: http://www.ieee.rwth-aachen.de/mp3/


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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