1

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.

Situation

What would be the best performing way to find out?

Florian Müller
  • 127
  • 1
  • 7
  • 1
    Translate the circle to the origin and look at the angle the points make with the $x$-axis. Simple and computationally fast. – mathematics2x2life Dec 29 '13 at 01:14
  • 1
    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... – Lucian Dec 29 '13 at 01:14
  • Hilarious ^^ Don't joke about my poor english :-P – Florian Müller Dec 29 '13 at 10:49
  • 1
    Your English is crystal; the two words are homonymic. :-) – Lucian Dec 29 '13 at 23:14

1 Answers1

2

Scalar product:

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).

Berci
  • 90,745