[SciPy-User] random points within an ellipse
Fri Aug 6 09:39:43 CDT 2010
On Thu, Aug 5, 2010 at 11:48 PM, Mark McClure <email@example.com> wrote:
> On Wed, Aug 4, 2010 at 8:18 PM, alex <firstname.lastname@example.org> wrote:
> > On Wed, Aug 4, 2010 at 7:38 PM, Benjamin Root <email@example.com> 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,
> >> has worked very nicely. However, I would like to start doing some
> >> 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:
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User