Possible Duplicate:
Create random number within an annulus
I would like to obtain a uniformly obtained random point within an annulus, that is, the area that lies inside a circle of radius R1
, but outside a circle of radius R2
, where R1 > R2
and both circles are centered at the same point. I would like to avoid using rejection sampling.
If possible, I would like the solution to be similar to this one —used for calculating random points within a circle— which I find it extremely elegant and intuitive. That is, I would also like to avoid using the square root.