[SciPy-User] random points within an ellipse

Benjamin Root ben.root@ou....
Fri Aug 6 09:39:43 CDT 2010

On Thu, Aug 5, 2010 at 11:48 PM, Mark McClure <mcmcclur@unca.edu> wrote:

> On Wed, Aug 4, 2010 at 8:18 PM, alex <argriffi@ncsu.edu> wrote:
> > On Wed, Aug 4, 2010 at 7:38 PM, Benjamin Root <ben.root@ou.edu> wrote:
> >
> >> For a project, I need to create sets of random coordinates within a 2d
> >> domain.  To start, I have been creating random x and y coordinates,
> which
> >> has worked very nicely.  However, I would like to start doing some
> fancier
> >> domains like ellipses and crescents.
> >
> > For an ellipse you could start with random points in a disk like this
> > http://mathworld.wolfram.com/DiskPointPicking.html
> > and then I think you can just stretch along an axis to give the points
> > inside the ellipse disk.
> This is definitely the way to go for an ellipse.  Essentially, this
> works because the determinant of the Jacobian of the underlying
> transformation is constant.  Given a parametrized domain with
> non-constant Jacobian determinant, it may be possible to re-scale the
> parametrization to one with constant Jacobian determinant.  Finding
> such a rescaling essentially boils down to solving differential
> equations.  If you are interested, I set up a Sage notebook that
> illustrates a few such examples:
> http://sagenb.org/home/pub/2336/
> Mark McClure

Oh, wow.  I think this is the best explanation yet about how to determine if
the point picking is uniform or not.  I have been doing a rescaling of the
unit circle to get my ellipse, and the results looked good, but it was
against my intuition that the points would still be uniform.


Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100806/8c6669f4/attachment.html 

More information about the SciPy-User mailing list