In the following solution, why is there a sqrt(u)? Since u is just a random number in [0, 1) doesn't getting the sqrt just give you another smaller random number?
To generate points uniformly, randomly, and independently within a circle of radius r around a location (x0, y0), start by generating two independent uniform random values u and v in the interval [0, 1). (This is what almost every random number generator provides you.) Compute
d = r * sqrt(u) theta = 2 * Pi * v x = d * cos(theta) y = d * sin(theta)
The desired random point is at location (x+x0, y+y0).