from a practical standpoint, something like this should work, it's
difficult to be sure at 5:30 in the AM.

get a random number from 1 - 10
var ranNum:Number = random(10)+1;
now if ranNum is less than 4 pick a random position within x of the origin
if ranNum is 6-8 select a random point within x + delta x
If ranNum is 9 - 10 select a random point from the entire range.
By playing with the ranges I used here you will get more or less
intensity near the origin. If this is too coarse, make ranNum a bigger
range and add more regions.
You could set this up in one tidy finction, it's less interesting than
the math, but it should get the job done.

On 5/27/06, clark slater <[EMAIL PROTECTED]> wrote:
Hi Ron,

Thanks for jumping into this thread amongst the tumbleweeds. Yes, I suspect
something logarithmic could work but don't know where to start. I am trying
to distribute 1000 particles randomly in a rectangular distribution area,
with a bias towards one side of the rectangle.

Clark


On 5/26/06, Ron Wheeler <[EMAIL PROTECTED]> wrote:
>
> Would a formula based on logarithms give you what you want as well?
> You were not very specific about what you wanted the distribution to
> look like.
>
> Ron
> clark slater wrote:
> > Here I go answering my own question.
> >
> > To make it more dense toward the origin, use {x,y} = {random[]^2,
> > random[]^2}--squaring the independently generated numbers
> > (random[]*random[]
> > won't work). The result is a distribution with a sharp cusp at the
> > origin--the probability is a maximum there, and has a discontinuous
> > derivative. You can use higher powers for narrower (and sharper)
> > distributions.
> >
> > Damn useful I say!
> > _______________________________________________
> > [email protected]
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> >
> _______________________________________________
> [email protected]
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



--
Weldon MacDonald
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to