POV-Ray : Newsgroups : povray.general : Even distribution on a sphere Server Time
5 Aug 2024 14:12:11 EDT (-0400)
  Even distribution on a sphere (Message 5 to 14 of 24)  
<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Tom Melly
Subject: Re: Even distribution on a sphere
Date: 15 Oct 2002 07:53:51
Message: <3dac01cf$1@news.povray.org>
"ABX" <abx### [at] abxartpl> wrote in message
news:rkunqu4ivtu7928rrf12ti4jo7jn8u86r6@4ax.com...

> My answer is not real answer but ... there is a macro in rand.inc include file
> in standard distribution called VRand_On_Sphere.
>

Ah, many thanks.....

Eep - I thought it might give me a clue, but I can't understand it at all. I
could rewrite some stuff to allow me to use it in this particular instance, but
that won't be as much fun as actually learning something....


Post a reply to this message

From: Tim Nikias
Subject: Re: Even distribution on a sphere
Date: 15 Oct 2002 07:57:21
Message: <3dac02a1$1@news.povray.org>
I'm not sure if its overkill, depends on what
you're trying to achieve. Still, the macro is very
easy to handle and needs to be run only once,
the data is then saved and can be loaded with
my I/O-Macros (which are available on my website).

But it depends on the amount of objects you're trying
to spread, as always with algorithms pending on amount...

Regards,
Tim

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

>
> Probably overkill in this case ("electrostatic repulsion algorithm"?
Yoiks!) -
> I've got some close approximations working (well, good enough for gov.
work).,
> but many thanks for the offer.
>


Post a reply to this message

From: Tom Melly
Subject: Re: Even distribution on a sphere
Date: 15 Oct 2002 08:30:08
Message: <3dac0a50$2@news.povray.org>
"Tim Nikias" <tim### [at] gmxde> wrote in message
news:3dac02a1$1@news.povray.org...
> I'm not sure if its overkill, depends on what
> you're trying to achieve. Still, the macro is very

Branch coral (well, distributing the coral) - I've posted an image to
binaries.images


Post a reply to this message

From: hughes, b 
Subject: Re: Even distribution on a sphere
Date: 15 Oct 2002 09:31:24
Message: <3dac18ac@news.povray.org>
Maybe this one from Mike Andrews last year might make some sense. Sure is
confusing to me though.

news://povray.org/3B97457B.26C14AE4@reading.ac.uk

That randomly distributed point macro ABX brought up, VRand_On_Sphere() is
of course 'random', and looking at that now I don't know how to go about
derandomizing it. Trying to here and I get nonuniform distribution and
nothing better.


Post a reply to this message

From: Tom Melly
Subject: Re: Even distribution on a sphere
Date: 15 Oct 2002 09:55:08
Message: <3dac1e3c@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3dabf5ef$1@news.povray.org...

Hmm, this seems to work for a hemisphere (which is all I need - although I'm
going to try and figure out how to make it work with any specified max angle).

// okay where MZRot = 90
#local ZRot = pow(rand(Rand1),0.5) * MZRot;
#local YRot = rand(Rand1) * MYRot;


Post a reply to this message

From: Tom Melly
Subject: Re: Even distribution on a sphere
Date: 15 Oct 2002 10:20:52
Message: <3dac2444@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3dac1e3c@news.povray.org...
>
> Hmm, this seems to work for a hemisphere (which is all I need - although I'm
> going to try and figure out how to make it work with any specified max angle).
>
> // okay where MZRot = 90
> #local ZRot = pow(rand(Rand1),0.5) * MZRot;
> #local YRot = rand(Rand1) * MYRot;
>


and this (rather kludgy) approach seems to work for a specified MZRot:

    #local ZRot = pow(rand(Rand1),0.5) * 90;
    #local YRot = MYRot*rand(Rand1);
    #if(rand(Rand1)<0.5)
      #local ZRot = 180 - ZRot;
    #end
    #if(ZRot <= MZRot)
            .... position coral
            ..... increment counter
    #end


Post a reply to this message

From: Alf Peake
Subject: Re: Even distribution on a sphere
Date: 15 Oct 2002 10:43:16
Message: <3dac2984@news.povray.org>
There was a discussion, on p.a-u I think, around a year ago re even
distribution of stars. Original poster also had your problem.

Alf


Post a reply to this message

From: Tom Melly
Subject: Re: Even distribution on a sphere
Date: 15 Oct 2002 10:53:38
Message: <3dac2bf2$1@news.povray.org>
"Alf Peake" <alf### [at] peake42freeservecouk> wrote in message
news:3dac2984@news.povray.org...
> There was a discussion, on p.a-u I think, around a year ago re even
> distribution of stars. Original poster also had your problem.
>

Yeh - I vaguely remember (or another discussion on the same topic). A starfield
is an obvious candidate for running up against this issue.


Post a reply to this message

From: Christopher James Huff
Subject: Re: Even distribution on a sphere
Date: 15 Oct 2002 16:51:33
Message: <chrishuff-876201.16463215102002@netplex.aussie.org>
In article <3dac2bf2$1@news.povray.org>,
 "Tom Melly" <tom### [at] tomandlucouk> wrote:

> Yeh - I vaguely remember (or another discussion on the same topic). A 
> starfield is an obvious candidate for running up against this issue.

But...stars aren't evenly distributed. A random distribution would be 
closer to reality.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Timothy R  Cook
Subject: Re: Even distribution on a sphere
Date: 15 Oct 2002 17:05:18
Message: <3dac830e$1@news.povray.org>
Christopher James Huff wrote:
> But...stars aren't evenly distributed. A random distribution would be 
> closer to reality.

An actual distribution of a few thousand would be even closer.  Hasn't
this already been covered in this group? ;)

-- 
Tim Cook
http://empyrean.scifi-fantasy.com
mirror: http://personal.lig.bellsouth.net/lig/z/9/z993126

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

<<< Previous 4 Messages Goto Latest 10 Messages Next 10 Messages >>>

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