2010/6/22 Benoit Daloze <eregontp / gmail.com>: > On 22 June 2010 01:12, Dave Howell <groups.2009a / grandfenwick.net> wrote: >> On Jun 21, 2010, at 15:45 , Caleb Clausen wrote: >>> On 6/19/10, Daniel Moore <yahivin / gmail.com> wrote: >>>> The quiz this week >>>> is to generate random points uniformly distributed within a circle of >>>> a given radius and position. > > Caleb: >> I guess this is why Benoit had that sqrt in there. I don't quite get >> why it's necessary. > > The image would then look like a point in the center. > I 'felt' it would result in that because the points near the center > will be much closer to each other, as it will be as much points at any > distance. > > And finally, why the sqrt? I just felt like I should have as many > points in each area, and the area of a circle is рт^2, so let's reduce > this r^2 and becomes r. (Also I wanted the random distance to be > likely further from the center, and as rand returns between 0 and 1, > we have to do ^(1/2) and not ^2. Found an explanation: http://www.anderswallin.net/2009/05/uniform-random-points-in-a-circle-using-polar-coordinates/