## Coordinates of a random point of a circle?

Hi.

If the radius of a circle is known and it's also known that its center is at X:0, Y:0, how can the points that form the circle be calculated? What would be the coordinates of a random point of the circle?

I made a simple illustration hoping that it would make the question a little clearer.

Any help would be fantastic.

Thank you!
Attached Thumbnails

 theres an equation for this
 That's great! I'd love know what would be that equation. I found the following: In an x-y coordinate system, the circle with centre (0, 0) and radius r is the set of all points (x, y) such that: $${x}^2+{y}^2={r}^2$$ But I'm not sure how to find the coordinates of a random point using this formula.

Recognitions:
Gold Member
Staff Emeritus

## Coordinates of a random point of a circle?

That depends strongly on what you mean by "random". You could, for example, choose x "randomly" (uniform distribution) between -r and r and then calculate y by $y= \pm\sqrt{r^2- x^2}$, choosing the "+" and "-" randomly with probability 1/2 for each.

A different way would be to use the "angle", $\theta$. Choose $\theta$ randomly (uniform distribution) between 0 and $2\pi$. Then use the formulas x= r cos($\theta$), y= r sin$\theta$. Notice that since $sin^2(\theta)+ cos^2(\theta)= 1$ that gives the same as $x^2+ y^2= r^2$.

This is, by the way, for a point on the circle, not a point in the disk. In order to choose points "randomly" in the disk $x^2+ y^2\le R^2$, choose two numbers, r chosen randomly between 0 and R, $\theta$ chosen randomly between 0 and $2\pi$ and then use $x= r cos(\theta)$, $y= r sin(\theta)$ to find the point (x,y).

 i took the statement to be " find an arbitrary point"
 Thank you very much HallsofIvy, that's really helpful!

Mentor
 Quote by HallsofIvy In order to choose points "randomly" in the disk $x^2+ y^2\le R^2$, choose two numbers, r chosen randomly between 0 and R, $\theta$ chosen randomly between 0 and $2\pi$ and then use $x= r cos(\theta)$, $y= r sin(\theta)$ to find the point (x,y).
Halls, you didn't specify how to choose r between 0 and R. Assuming you meant a uniform distribution, the selected points will not be uniformly distributed on the disk. Choosing r2 randomly between 0 and R2 will result in a uniform distribution over the disk. Another approach is to choose x and y randomly between -R and R. Repeatedly draw pairs until x2 + y2 < R2.

Recognitions:
 Quote by HallsofIvy That depends strongly on what you mean by "random". You could, for example, choose x "randomly" (uniform distribution) between -r and r and then calculate y by $y= \pm\sqrt{r^2- x^2}$, choosing the "+" and "-" randomly with probability 1/2 for each. A different way would be to use the "angle", $\theta$. Choose $\theta$ randomly (uniform distribution) between 0 and $2\pi$. Then use the formulas x= r cos($\theta$), y= r sin$\theta$. Notice that since $sin^2(\theta)+ cos^2(\theta)= 1$ that gives the same as $x^2+ y^2= r^2$.
I just want to emphasize that these two methods really are, as Halls said, different! Assuming y'all have drawn a picture, can you see that the first way makes it more likely that our "random" point will lie in the top or bottom quarter arcs rather than the left or right quarter arcs? These are both perfectly valid probability measures, but the second one is more likely to correspond to what most people probably expect when we say "choose a point at random on the circle".

The circle happens to be a compact Lie group, so it has a unique bi-invariant probability measure, Haar measure. Only the second probability measure described by Halls is invariant under the rotational symmetry of the circle! This second measure is in fact the Haar probability measure on $SO(2)$.

More generally, you can ask to "choose a random element" in other compact Lie groups such as $SO(n)$ or $SU(n)$, meaning "according to Haar measure", and then things get a little tricky. It's important to get this right if you are simulating a quantum system. See Francesco Meddrazzi, "How to Generate Random Matrices from the Classical Compact Groups ", Notices of the AMS 54 (2007): 592-604 http://www.ams.org/notices/200705/fea-mezzadri-web.pdf

Mentor
 Quote by Chris Hillman Assuming y'all have drawn a picture, can you see that the first way makes it more likely that our "random" point will lie in the top or bottom quarter arcs rather than the left or right quarter arcs? These are both perfectly valid probability measures, but the second one is more likely to correspond to what most people probably expect when we say "choose a point at random on the circle". Only the second probability measure described by Halls is invariant under the rotational symmetry of the circle! This second measure is in fact the Haar probability measure on $SO(2)$.
Even Halls' second probability measure does not quite correspond to what people expect of a point "chosen randomly on the circle".The random points will tend to cluster around the center by making the radius a uniform random variable. A slightly different approach is needed to make the distribution uniform in terms of area.

The distinction is important because a point drawn randomly from the unit disk forms the basis for many other random distributions such as the normal distribution. To generate a normal variate, one first draws a random point from a distribution spread uniformly in terms of area over the unit disk and then transforms this point to a pair of normal deviates using either the Box-Müller transform or the Marsaglia polar method.

Recognitions:
 Quote by D H Even Halls' second probability measure does not quite correspond to what people expect of a point "chosen randomly on the circle". The random points will tend to cluster around the center by making the radius a uniform random variable.
Huh? You seem to be talking about choosing a point in a disk, but Halls was careful to state that he is talking about choosing a point on the circle (boundary of the disk). More generally, it is clear that "randomly choosing" a point from a ball is a completely different proposition from "randomly choosing" a point on a sphere (boundary of the ball).

In case this wasn't clear, I have been talking about the two alternate methods Halls discussed for choosing "at random" a point on a circle of fixed radius. (First two paragraphs of his post above.)

Mentor
 Quote by Chris Hillman Huh? You seem to be talking about choosing a point in a disk, but Halls was careful to state that he is talking about choosing a point on the circle (boundary of the disk).
I was talking at cross-purposes. I addressed the second part of Halls' post (below). I did not read your post carefully enough to realize that you were addressing the first part of his post. And yes, I do know the difference between a set and its boundary. Honest!

 Quote by HallsofIvy In order to choose points "randomly" in the disk $x^2+ y^2\le R^2$, choose two numbers, r chosen randomly between 0 and R, $\theta$ chosen randomly between 0 and $2\pi$ and then use $x= r cos(\theta)$, $y= r sin(\theta)$ to find the point (x,y).

 Recognitions: Gold Member Science Advisor Staff Emeritus If the center of the circle is at (a, b) and the circle has radius r, then $$(x-a)^2+ (y-b)^2= r^2$$
 Recognitions: Gold Member Science Advisor Staff Emeritus It's still not clear what you want to do. You first asked about random points on a circle. What do you mean by "random"? As has been pointed out above, you could assume that x is uniformly distributed between -r and r and the calculate y. Or you could assume that the angle, $\theta$ the line from the center of the circle to the point on the circl makes with the "positive x-axis" is uniformly distributed between 0 and 360 degrees and calculate x and y with $x= a+ r cos(\theta)$, $y= b+ r sin(\theta)$. ((a,b) is the center of the circle.) Or, you might use some other, non-uniform, distribution for x or $\theta$, giving completely different results. Now you ask "lets say i know one point (x1,y1) on the circle,is that possible to calculate another 9 points that lie evenly on the circle?". I assume that by "lie evenly on the circle" you mean equal distances between the points. Since there are 360 degrees in a circle 10 points, the points must be 360/10= 36 degrees apart. You can get the angle for the first point by $$tan(\theta)= \frac{sin(\theta)}{cos(\theta)}= \frac{y_1}{x_1}$$ Once you know $\theta$, calculate the other 9 points with $$x= r cos(\theta+ 36n)$$ [tex]y= r sin(\theta+ 36n[\tex] with n from 1 to 9. Be sure your calculator is in degree mode!