Answer the question
In order to leave comments, you need to log in
How to check a point in a sector of a circle between two corners?
Hello everyone, I need your help
. We have a circle with a known radius, it has two corners that form a sector between them. It is necessary to determine or prove by an equation that this point is in the sector between them. The coordinates of the point are known, the angle and the beginning of the measurement are also known.
Answer the question
In order to leave comments, you need to log in
The angle of a vector passing through a point is defined as the arc tangent of the ratio y/x. It is only necessary to take into account the quarter in which the point is located (according to the signs of the coordinates). For details on google.
Next, decide which sector you want to belong to. As far as I understand, in this case it is required to find the “closest” pair of vectors that form the given angles (90 and 100 are closer than 45 and 130, 45 and 100, 90 and 130).
Well, it remains only to check whether the vector passing through the point lies in the desired sector.
Convert the point's coordinates to polar coordinates and check if the phi point falls within the sector interval.
Direct approach: convert point coordinates to polar and compare angles. Pros: ease of implementation. Cons: possible nuances with rounding (edge effects).
OK
Seriously? Do you have angles on a circle? How do the numbers on the left compare with the picture on the right?
As I understand it: there are two non-coinciding segments, with the origin at the origin and ends on the circle. A sector is formed between the segments (there are two of them, for your information, so decide which sector we are looking for - larger or smaller, which one is equal, if two sectors are equal). You know the polar coordinates of the ends of these segments. If you do not know what polar coordinates are, then for a moment - you are on the Internet - you undertake to solve such a problem - take the trouble to find out! Don't expect school geometry to be explained to you here!
Further, knowing the coordinates of the segments in the polar coordinate system (UCS) and the coordinates of the point in the Cartesian (rectangular) coordinate system (DSC) - either translate the first into the second, or vice versa. I recommend using PSK. Get the value of the radius and angle. The radius can already give an answer, since if the radius is greater than the radius of the circle, then the point is outside the circle. Having received the angle - compare the value - it must lie between the two angles.
If you do not know how to convert DSC to PSC - see above, you have all the knowledge of the world in your hands.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question