# Find if point lies into given sector of circle

I am looking for a good method to find out if a specified point lies within a specified circle. The situation looks as follows:

Where the line at r has a given heading (60°). I now want to find out, if point E and F lie within this half of the circle. E does, F does not.

The center of the circle and the points E/F are given by coordinates X/Y, so the circle center is not 0/0.

What would be the best performing way to find out?

• Translate the circle to the origin and look at the angle the points make with the $x$-axis. Simple and computationally fast. Dec 29, 2013 at 1:14
• How to tell if a point lies in a given sector of a circle ? Hmmm... I guess that would depend on whether there are laws in that specific sector which prohibit the use of torture in the process of extracting the truth... If the latter, then kidnapping the point and bringing it to a secure location situated in a sector where said things are allowed might be a good way (though perhaps not necessarily the best) of getting to the bottom of things, and establishing once and for all whether what the point says is indeed true or not... Dec 29, 2013 at 1:14
• Hilarious ^^ Don't joke about my poor english :-P Dec 29, 2013 at 10:49
• Your English is crystal; the two words are homonymic. :-) Dec 29, 2013 at 23:14

In the picture $X$ denoted the center of the circle, the coordinates of $\vec XB$ are obtained by performing $B-X$ coordinatewise.
Now, we have $\vec{XB}\cdot\vec{XE}>0$ iff $E$ lies in the same halfplane as $B$, (then $\vec{XB}\cdot\vec{XE}=0$ iff $XB\perp XE\$ and $\ \vec{XB}\cdot\vec{XE}<0$ iff $E$ lies in the other halfplane).