POV-Ray : Newsgroups : povray.general : Placing objects on spheres... Server Time
14 Oct 2026 18:41:10 EDT (-0400)
  Placing objects on spheres... (Message 1 to 18 of 18)  
From: Tim Nikias
Subject: Placing objects on spheres...
Date: 27 Aug 2002 12:39:49
Message: <3d6bab55$1@news.povray.org>
Hi all!

I'm looking for a method to calculate positions in order
to place objects with N radius onto a sphere with R radius.
These small objects shouldn't intersect each other (as less
as possible), but cover the entire sphere.

I need this to generate positions for some CSG-Hairs to
get a furball (the last try was suspected to be fireworks...)

I'm thankful for any link or help regarding this, and do
note that I'm the kinda guy who likes to script the required
algorithms himself...

Thanks,

Tim

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: ABX
Subject: Re: Placing objects on spheres...
Date: 27 Aug 2002 12:46:31
Message: <q3bnmu0sbvs20bve02r9rv0lh3t3oor8rh@4ax.com>
On Tue, 27 Aug 2002 18:40:36 +0200, "Tim Nikias" <tim### [at] gmxde> wrote:
> I'm looking for a method to calculate positions in order
> to place objects with N radius onto a sphere with R radius.

http://www.math.niu.edu/~rusin/known-math/index/spheres.html

ABX


Post a reply to this message

From: Christoph Hormann
Subject: Re: Placing objects on spheres...
Date: 27 Aug 2002 12:47:26
Message: <3D6BAD1E.2007FB01@gmx.de>
Tim Nikias wrote:
> 
> Hi all!
> 
> I'm looking for a method to calculate positions in order
> to place objects with N radius onto a sphere with R radius.
> These small objects shouldn't intersect each other (as less
> as possible), but cover the entire sphere.

http://astronomy.swin.edu.au/~pbourke/geometry/spherepoints/index.html

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: TinCanMan
Subject: Re: Placing objects on spheres...
Date: 27 Aug 2002 14:54:53
Message: <3d6bcafd$1@news.povray.org>
Try dissecting this macro I wrote a couple of years ago.  It basically
triangulates a sphere to 'n' iterations (like a geodesic sphere).  The
limitation here is that you are restricted to the number of points related
to the iteration level 'n' (I don't know the formula off the top of my
head).  I did this a long time ago and my brain isn't functioning properly
at the moment to be of any further help...

-tgq


#macro Geodesic(n,R,Obj)
  union{
    #if (n=0)
      object{Obj}
    #else
      #local nL=2^(n-1);
      #local i=-nL;
      #while (i<=nL)
        #local nS=4*(nL-abs(i));
        #if (nS=0)
            object{Obj translate<0,0,-R> rotate x*i*90/nL}
        #else
          #local j=0;
          #while (j<nS)
            object{Obj translate<0,0,-R> rotate x*i*90/nL rotate y*j*360/nS}
            #local j=j+1;
          #end
        #end
        #local i=i+1;
      #end
    #end
  }
#end


Post a reply to this message

From: Jan Walzer
Subject: Re: Placing objects on spheres...
Date: 27 Aug 2002 16:20:23
Message: <3d6bdf07@news.povray.org>
"TinCanMan" <Tin### [at] hotmailcom> wrote:
> ... . The
> limitation here is that you are restricted to the number of points related
> to the iteration level 'n' (I don't know the formula off the top of my
> head).

If you're really doing "standard" triangulation of a sphere with equidistant
points, then it should be something like s*(4^n) triangles where s is the
number of the starting triangles (its easy if you start with an octaeder)


Post a reply to this message

From: Shay
Subject: Re: Placing objects on spheres...
Date: 27 Aug 2002 16:44:11
Message: <3d6be49b@news.povray.org>
Tim Nikias <tim### [at] gmxde> wrote in message
news:3d6bab55$1@news.povray.org...

Start with a cube. If you ever want to color the hairs in any type of
organized fashion you will be glad you did. I played around with several
different ways of dividing a sphere, and this is by far the most versatile.

 -Shay


Post a reply to this message

From: Tim Nikias
Subject: Re: Placing objects on spheres...
Date: 28 Aug 2002 00:55:05
Message: <3d6c57a9@news.povray.org>
This looks like the most easy one to implement and the example
pic shows that it really is what I'm looking for...

Thanks for this one...


--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

> >
> > I'm looking for a method to calculate positions in order
> > to place objects with N radius onto a sphere with R radius.
> > These small objects shouldn't intersect each other (as less
> > as possible), but cover the entire sphere.
>
> http://astronomy.swin.edu.au/~pbourke/geometry/spherepoints/index.html
>


Post a reply to this message

From: Tim Nikias
Subject: Re: Placing objects on spheres...
Date: 28 Aug 2002 00:56:03
Message: <3d6c57e3$1@news.povray.org>
There are a lot of links, and the mathematical descriptions
are sometimes a little above me, but I'll keep the links and
see if I can find something more efficient and more versatile
than what Christoph posted. Nontheless, thanks!

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

> > I'm looking for a method to calculate positions in order
> > to place objects with N radius onto a sphere with R radius.
>
> http://www.math.niu.edu/~rusin/known-math/index/spheres.html
>
> ABX


Post a reply to this message

From: Tim Nikias
Subject: Re: Placing objects on spheres...
Date: 28 Aug 2002 00:58:15
Message: <3d6c5867$1@news.povray.org>
Are you referring to the method described in Christoph's
link on the bottom "Uniform Distribution - Hypercube rejection
method"? It does look interesting, solving how to let it us
a given number of positions might be interesting though...

Also, texturing the hairs shouldn't be too difficult anyways,
I can always use the base-position for calculations,
can't I?

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

> Start with a cube. If you ever want to color the hairs in any type of
> organized fashion you will be glad you did. I played around with several
> different ways of dividing a sphere, and this is by far the most
versatile.
>


Post a reply to this message

From: Ken
Subject: Re: Placing objects on spheres...
Date: 28 Aug 2002 01:12:45
Message: <3D6C5C89.D55978E4@pacbell.net>
Tim Nikias wrote:
> 
> Hi all!
> 
> I'm looking for a method to calculate positions in order
> to place objects with N radius onto a sphere with R radius.
> These small objects shouldn't intersect each other (as less
> as possible), but cover the entire sphere.
> 
> I need this to generate positions for some CSG-Hairs to
> get a furball (the last try was suspected to be fireworks...)
> 
> I'm thankful for any link or help regarding this, and do
> note that I'm the kinda guy who likes to script the required
> algorithms himself...

See Also - http://www.ogre.nu/sphere.htm

-- 
Ken Tyler


Post a reply to this message

From: Shay
Subject: Re: Placing objects on spheres...
Date: 28 Aug 2002 12:33:18
Message: <3d6cfb4e@news.povray.org>
Tim Nikias <tim### [at] gmxde> wrote in message
news:3d6c5867$1@news.povray.org...
> Are you referring to the method described in Christoph's
> link on the bottom "Uniform Distribution - Hypercube rejection
> method"?

No, something much simpler. I am talking about taking a cube and inflating
it into a sphere. I found this pic on google:
http://www.truegrid.com/sphere.100.jpg .
Of course this doesn't give you as much freedom over how many points you
want, but it has other advantages. I had a macro which split up a sphere
three different ways, but I guess I killed it, because I cannot find it.

>
> Also, texturing the hairs shouldn't be too difficult anyways,
> I can always use the base-position for calculations,
> can't I?
>

I am guessing that by "base-position" you mean the location of the hair
before or after it is wrapped around the sphere. If this is the case, then
the pigment will have to be placed in a 2D pattern which will represent the
sphere "unwrapped." With the inflated cube method, this 2D representation
can be a simple 't' shape if you don't mind just a little distortion. This
method will also return a point set much faster than any other I can think
of.

 -Shay


Post a reply to this message

From: Tim Nikias
Subject: Re: Placing objects on spheres...
Date: 28 Aug 2002 18:59:43
Message: <3d6d55df$1@news.povray.org>
> I am guessing that by "base-position" you mean the location of the hair
> before or after it is wrapped around the sphere. If this is the case, then
...snip...

Nope, I meant the actual position on the sphere.

As for speed, that might be true, but look at Christoph's link, that first
algorithm looks very promising to me...



--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Shay
Subject: Re: Placing objects on spheres...
Date: 28 Aug 2002 21:19:49
Message: <3d6d76b5$1@news.povray.org>
"Tim Nikias" <tim### [at] gmxde> wrote in message
news:3d6d55df$1@news.povray.org...

>
> Nope, I meant the actual position on the sphere.

Still, you need to map which pigment to apply for any given position on the
sphere.

>
> As for speed, that might be true, but look at Christoph's link, that first
> algorithm looks very promising to me...
>

Looks very cool, but I wouldn't want to wait for over about 500 hairs. It
might take several days to parse.

 -Shay


Post a reply to this message

From: Tim Nikias
Subject: Re: Placing objects on spheres...
Date: 29 Aug 2002 00:59:06
Message: <3d6daa1a$1@news.povray.org>
If I get to it, I'll script the algorithm today, then I'll
tell you, how long it does take...

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

> Looks very cool, but I wouldn't want to wait for over about 500 hairs. It
> might take several days to parse.


Post a reply to this message

From: Shay
Subject: Re: Placing objects on spheres...
Date: 29 Aug 2002 14:25:46
Message: <3d6e672a@news.povray.org>
Tim Nikias <tim### [at] gmxde> wrote in message
news:3d6daa1a$1@news.povray.org...
> If I get to it, I'll script the algorithm today, then I'll
> tell you, how long it does take...
>

Considering 10K hairs would require literally BILLIONS of operations, we may
have to wait more than one day for your response!!<g> The code will be very
useful for other things, however.

 -Shay


Post a reply to this message

From: Tim Nikias
Subject: Re: Placing objects on spheres...
Date: 29 Aug 2002 16:29:27
Message: <3d6e8427@news.povray.org>
So. Code cooked.

Well. Hm. You were right.
*crunching on a woodstick*

Takes ages for decent amounts of nodes.

Makes interesting animations though!
*sigh*

Well. I'll be trying some other algorithms
(hypercube to begin with something that'll
work FAST).

By the way... What could the code be used for?

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

> Considering 10K hairs would require literally BILLIONS of operations, we
may
> have to wait more than one day for your response!!<g> The code will be
very
> useful for other things, however.


Post a reply to this message

From: Shay
Subject: Re: Placing objects on spheres...
Date: 29 Aug 2002 17:44:00
Message: <3d6e95a0@news.povray.org>
Tim Nikias <tim### [at] gmxde> wrote in message
news:3d6e8427@news.povray.org...
>
> By the way... What could the code be used for?
>

Gerbera seed clusters for a close-up?

-Shay


Post a reply to this message

From: Tim Nikias
Subject: Re: Placing objects on spheres...
Date: 29 Aug 2002 18:39:32
Message: <3d6ea2a4@news.povray.org>
Didn't I use fibonacchi for that already?



--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

>
> Gerbera seed clusters for a close-up?
>


Post a reply to this message

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