|
|
Christopher James Huff <cja### [at] earthlinknet> wrote in
news:cja### [at] netplexaussieorg:
> In article <Xns### [at] 204213191226>,
> Alain <noe### [at] onca> wrote:
>
>> (Where 5 is your radius)
>>
>> 5/(1+rand(S))*vnormalize(-1+2*<rand(S),rand(S),rand(S)>)
>
> This will not give anything close to an even distribution. The places
> where points in the corners of the box were projected onto the sphere
> surface will have higher densities. And I have no idea what you think
> you're doing by subtracting a uniform random value in the range [0, 1]
> from 1...this has no effect. And then dividing 5 by that value...you
> do know this will give points with distances from the origin from 5
> units out to infinity, don't you? Points *outside* the sphere, most of
> them *far* outside.
Sorry condescending dude, but I have no idea what you are talking about.
What subtraction do you have a problem with? The -1? It establishes a
range -1 to +1. You have a problem with the 1+? It's a simple inversely
proportional equation. Besides I just tried it in Pov and it seems to
work fine. Yes, it's not an even distribution, it favours points towards
the outside (but not outside), which was intended in that one. And, yes,
even the second equation I gave, as pointed out by Warp, will only
distribute randomly radially.
Post a reply to this message
|
|