[SciPy-User] random points within an ellipse

Benjamin Root ben.root at ou.edu
Thu Aug 5 22:11:00 EDT 2010


On Thu, Aug 5, 2010 at 8:23 PM, David Goldsmith <d.l.goldsmith at gmail.com>wrote:

> Ben:
>
> Nicky brings up a good point: you need to be clear on precisely how you
> want the points to be distributed; I was thinking more about my final
> "working" example in which the area density appears to be inversely related
> to r (which I attributed to the size of the points being more significant
> with decreasing r) and I think (I'm too lazy/have too many other priorities
> to prove) that the true explanation is that my distribution is uniform with
> respect to r (and axially symmetric, which you almost certainly want), which
> makes the expected number of points per unit area decrease as 1/r (again,
> this is a conjecture, I'm not claiming to have proven it).  If you want a
> distribution in which the expected number of points per unit area is
> independent of r (and theta), i.e., a "unit-area-uniform" distribution, I
> think either Alan's or Erin's methods are what you want.
>
> DG
>
>
Yeah, I am looking more for a unit-area-uniform distribution, and various
references have pointed out that simply using random r and theta and
plugging them in will produce unexpected biases.

I have been hesitant about the rejection methods because I thought there
might be a better, more direct method.  However, it does look like I might
have to go towards Alan's or Erin's methods as I edge towards a more general
case of allowing arbitrary regions for random point generation.

Thanks for all your help!
Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20100805/13effb9e/attachment.html>


More information about the SciPy-User mailing list