[SciPy-User] random points within an ellipse
Thu Aug 5 20:58:29 CDT 2010
On Thu, Aug 5, 2010 at 4:16 PM, nicky van foreest <firstname.lastname@example.org>wrote:
> I actually wonder whether this is the type of distribution you want to
> see. Lets apply the method described below to a circle (that is just a
> special type of ellipse) with unit radius and center at (0,0). With p
> =1/2 you will hit the segments of the circle at the left of the line
> such that x=-1/2 or at the right of the line with x =1/2. However the
> segments above the line with y=1/2 or below the line with y = -1/2
> will be hit with a smaller probability. Thus, the distribution of
> points on the circle produced by the method below is certainly not
> rotationally invariant.
> I recall having read three ways to produce a random point in a circle,
> but I forgot where (perhaps it can be found in Feller, or the book by
> Jaynes), and each of the three methods gives different distributions
> with different properties.
Running the code for just a regular circle (and shrinking the size of the
markers), I can not see any visual evidence of biases within the ellipse.
Maybe it, mathematically, has a slight bias one way or another, but I think
Ian's approach to be sufficient for my purposes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User