PDA

Click to See Complete Forum and Search --> : Point in a circle? Yes or No.


Vlatko
Jun 25th, 2001, 08:26 AM
A circle is given: x^2 + y^2 - 2*x - 4*y + 4 = 0

Now, how do i find out where the point A(2,3) is. What i mean: is it in the circle (not the center) or outside the circle

Edwin_Drood_1870
Jun 25th, 2001, 08:47 AM
I'm not sure about this but I would say just solve the equation:

x^2 + y^2 - 2*x - 4*y + 4 = 0
and
A(2,3)

to get

2^2 + 3^2 - 2*2 - 4*3 + 4 = 0

to find out if it's a solution,
then you would have to graph the circle somehow.
It would be alot easier in polar coordinates.

unformed
Jun 25th, 2001, 11:37 AM
what you can do is first convert the eq to the notation
(x-h)^2 + (y-k)^2 = r^2
where (h,k) is the center and r is the radius

which comes out to:
(x-1)^2 + (y-2)^2 = 1

then given a point A(a,b) check the distance between A and the center of the circle (1,2).
Then if:
d<1 : inside circle
d>1: outside circle
d=1: on circle

to check the distance, use the formula:

d^2 = (x2-x1)^2 + (y2-y1)^2

--------------------------------------
so to check the point (2,3) you'd first find the distance:
d^2 = (2-1)^2 + (3-2)^2 = 1 + 1 = 2
d=1.414
1.414>1 therefore, point is outside of circle

Vlatko
Jun 25th, 2001, 02:29 PM
Argh! Thanks unformed.
:)