Coordinates of a random point of a circle?

Click For Summary

Discussion Overview

The discussion revolves around how to calculate the coordinates of points on a circle given its radius and center. Participants explore methods for selecting random points on the circle and address the implications of different definitions of "random." The conversation also touches on generating points in a disk and the mathematical relationships involved.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants propose using the equation {x}^2 + {y}^2 = {r}^2 to define points on a circle centered at (0, 0).
  • One method suggested involves choosing x randomly between -r and r and calculating y using y = ±√(r^2 - x^2), with a random choice between the positive and negative roots.
  • Another method involves selecting a random angle θ uniformly between 0 and 2π, then calculating coordinates using x = r cos(θ) and y = r sin(θ).
  • Some participants note that the first method may lead to a non-uniform distribution of points on the circle, while the second method is argued to be more representative of a uniform distribution.
  • There is a discussion about the implications of choosing points randomly in the disk versus on the circle, with emphasis on how different methods affect the distribution of points.
  • A later reply questions how to calculate evenly spaced points on a circle when the center is not at the origin, suggesting the need for a different approach.
  • One participant highlights the distinction between choosing points on the boundary of a disk versus within the disk itself, emphasizing the importance of clarity in definitions.

Areas of Agreement / Disagreement

Participants express differing views on the definition of "random" and the implications of various methods for selecting points on the circle. There is no consensus on the best approach, and the discussion remains unresolved regarding the optimal method for generating random points.

Contextual Notes

Limitations include the lack of specification regarding the distribution of random points and the potential confusion between points on the circle versus points within the disk. The discussion also highlights the need for clarity in mathematical definitions and assumptions.

M40
Messages
8
Reaction score
2
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!
 

Attachments

  • circle_question.gif
    circle_question.gif
    4.1 KB · Views: 841
Last edited:
Mathematics news on Phys.org
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:
[tex]{x}^2+{y}^2={r}^2[/tex]

But I'm not sure how to find the coordinates of a random point using this formula.
 
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 [itex]y= \pm\sqrt{r^2- x^2}[/itex], choosing the "+" and "-" randomly with probability 1/2 for each.

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

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 [itex]x^2+ y^2\le R^2[/itex], choose two numbers, r chosen randomly between 0 and R, [itex]\theta[/itex] chosen randomly between 0 and [itex]2\pi[/itex] and then use [itex]x= r cos(\theta)[/itex], [itex]y= r sin(\theta)[/itex] to find the point (x,y).
 
Last edited by a moderator:
i took the statement to be " find an arbitrary point"
 
Thank you very much HallsofIvy, that's really helpful!
 
HallsofIvy said:
In order to choose points "randomly" in the disk [itex]x^2+ y^2\le R^2[/itex], choose two numbers, r chosen randomly between 0 and R, [itex]\theta[/itex] chosen randomly between 0 and [itex]2\pi[/itex] and then use [itex]x= r cos(\theta)[/itex], [itex]y= r sin(\theta)[/itex] 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.
 
This is a famous trick question!

HallsofIvy said:
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 [itex]y= \pm\sqrt{r^2- x^2}[/itex], choosing the "+" and "-" randomly with probability 1/2 for each.

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

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 [itex]SO(2)[/itex].

More generally, you can ask to "choose a random element" in other compact Lie groups such as [itex]SO(n)[/itex] or [itex]SU(n)[/itex], 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
 
Last edited:
Chris Hillman said:
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 [itex]SO(2)[/itex].
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.
 
  • #10
D H said:
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.)
 
Last edited:
  • #11
Chris Hillman said:
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!

HallsofIvy said:
In order to choose points "randomly" in the disk [itex]x^2+ y^2\le R^2[/itex], choose two numbers, r chosen randomly between 0 and R, [itex]\theta[/itex] chosen randomly between 0 and [itex]2\pi[/itex] and then use [itex]x= r cos(\theta)[/itex], [itex]y= r sin(\theta)[/itex] to find the point (x,y).
 
  • #12
Ok

:wink:
 
  • #13
You're right, I did not specify what distribution to use for r. Sneaky of me wasn't it! Actually the original post said only "random point" and did not say it had to be uniform over either the circle or the disk.
 
  • #14
What about if the center of the circle is not at the origin?but still the radius is known.how we calculate 10 evenly points (xi,yi) on the circle? anyone can help?
 
  • #15
If the center of the circle is at (a, b) and the circle has radius r, then
[tex](x-a)^2+ (y-b)^2= r^2[/tex]
 
Last edited by a moderator:
  • #16
HallsofIvy said:
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

Thanks HallsofIvy, but let's say i know one point (x1,y1) on the circle,is that possible to calculate another 9points that lie evenly on the circle?
 
  • #17
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, [itex]\theta[/itex] 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 [itex]x= a+ r cos(\theta)[/itex], [itex]y= b+ r sin(\theta)[/itex]. ((a,b) is the center of the circle.) Or, you might use some other, non-uniform, distribution for x or [itex]\theta[/itex], 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
[tex]tan(\theta)= \frac{sin(\theta)}{cos(\theta)}= \frac{y_1}{x_1}[/tex]

Once you know [itex]\theta[/itex], calculate the other 9 points with
[tex]x= r cos(\theta+ 36n)[/tex] [tex]y= r sin(\theta+ 36n[\tex]<br /> with n from 1 to 9. Be sure your calculator is in degree mode![/tex]
 
  • #18
i used your formulas but what i got is the points forming a circle centered at origin with the given radius r which is not what i expect. so here the questions to make sure what i did is correct: when you said x is uniformly distributed between -r and r , is r=radius of the circle? are angles of theta always same for each x value (apart from the additional values of 36n)?

p/s they are not random points but are specific points on the ring equally distance between points.

the sketch of my problem is like in the attachment which only point (x1,y1) and (a,b) are known.i want to find the other 9 coordinates.really sorry i don't know how to explain very well.
 

Attachments

Last edited:
  • #19
HallsofIvy said:
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.)

HallsofIvy said:
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)= sin(theta)/cos(theta)=y1/x1

Once you know [theta], calculate the other 9 points with
x= r cos(theta+ 36n) , y= r sin(theta+ 36n)
with n from 1 to 9

Okay I think i manage to solve my problem when I combine those two types of formulas that you gave me. It becomes x=a+r cos {(y1/x1)+36n} and y=b+r sin {(y1/x1)+36n}. is it make sense? thankk youuuu very much btw...
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
6K
Replies
6
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K