MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Coordinates for circle

Manuel wrote:

>Hi Everyone
>Maybe I can restate my problem of two days ago since I didn't get any
>replies. Given two coordinates on a circle, for example,{0,0},{2,2},
>and the radius of the
>circle, i.e.,2 Sqrt[5], to get a third set of coordinates. With this
>third set, using the standard Quadric form for a circle,i.e., a x^2 + a

>y^2 + b x + c y + d ==0, using the Conics from mathematica I can get
>the equation of the circle- which is what I'm looking for.   Thanks for


The point closest to {(x1+x2)/2, (y1+y2)/2} is on the line bisecting the
segment {x1,y1}, {x2,y2} at the distance  r - Sqrt(r^2 - (1/4)d^2)
where d is the length of the segment  {x1,y1}, {x2,y2}. Using

of triangles and some trigonometry one finds

In[1]:=  circlePt[{x1_, y1_}, {x2_, y2_}, r_] :=
             Module[{u, v, d =  Sqrt[(x2 - x1)^2 + (y2 - y1)^2], h},
                h = r - Sqrt[r^2 - (1/4) d^2];
                u = (x1 + x2)/2 - h Abs[y2 - y1]/d;
                v = (y1 + y2)/2 + h (Abs[x2 - x1]/d)*Sign[(y2 - y1)/(x2
- x1)];
                Return[{u, v}]]

 The points {1,1} and {0,4} are on the circle (x-2)^2 + (y-3)^2 = 5 If
these points are given and the radius is Sqrt[5],the formula gives a
point on that circle.

In[2]:=  pt=N[circlePt[{1,1},{0,4},Sqrt[5]],16] Out[3]= 

In[3]:=  (First[pt]-2)^2+(Last[pt]-3)^2 Out[4]=  5

A similar formula can be written for the other point where the circle
intersect the bisector of the segment {x1,y1}, {x2,y2}. The center of
the circle is clearly the midpoint of that segment.

Ranko Bojanic
bojanic at

  • Prev by Date: Discontinuity of theta functions
  • Next by Date: Protecting from evaluation
  • Previous by thread: Discontinuity of theta functions
  • Next by thread: Re: Coordinates for circle