Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Equation of a circle through 3 points in 3D space

  1. Jun 13, 2007 #1
    Hello there

    I am trying to figure out this but am having some difficulty. Your help would be much appreciated.

    I have 3 points in 3D space: (x1,y1,z1), (x2,y2,z2) and (x3,y3,z3). My objective: I need to find out the radius of the circle that passes through these 3 points.

    I know how to do this if the points were in 2D space (there are several Google links that explain it). But I don't know how to do it if the points are in 3D space. I don't need the equation of the circle, just the radius of the circle that passes through these three 3D points.

    Thanks a lot for taking the time to respond.
     
  2. jcsd
  3. Jun 13, 2007 #2

    matt grime

    User Avatar
    Science Advisor
    Homework Helper

    you can find the distances between these three points, and the angles between all the lines through pairs of points, thus you can construct a triangle - now you need the radius of the circle that circumscribes such a triangle, which is purel y a problem in the plane that you know how to do.
     
  4. Jun 13, 2007 #3
    Be careful. Not all triangles can be circumscribed by a circle. While there is an infinite number of triangles in 3-D space that can be circumscribed by a circle, not all possible triangles can be circumscribed by a circle. It is possible to have a set of three points that cannot be circumscribed by a circle.
     
  5. Jun 13, 2007 #4

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    Three non-colinear points define a plane. Three non-colinear points on a plane form the vertices of a triangle. All triangles have a circumcircle; this is one of Euclid's propositions. The only constraint is that the points not be colinear.
     
  6. Jun 13, 2007 #5
    I still think there is only one circle that circumscribes the given triangle no mater in 2D or 3D. A triangle always defines a plane.
     
  7. Jun 13, 2007 #6
    You are absolutely correct D H. All triangles do indeed have a circumcircle. I was absolutely dead wrong to say that there are some triangles that do not have a circumcircle.

    I am sorry if my statement generated any confusion for you, ady_mech.

    I thinks it's ironic that I tried to help on this forum, and now I am the one doing the learning:rofl:
     
  8. Jun 13, 2007 #7
    ??? I don't think you are correct... Say we chose two points (on the xy plane) and define the line that goes through both and then the median. Any point on the median is equally distanced from the two points. The equation of the median can be put in the form

    [tex]y = mx + b [/tex]

    Say A and B are the points in question. Point C is the other one. For a particular point on the median, the distance squared between that point and [tex]A = (a_{x}, a_{y}) [/tex] is

    [tex](x - a_{x})^{2} + (mx + b - a_{y})^2 [/tex]

    And the distance squared between that point and [tex]C = (c_{x}, c_{y})[/tex] is

    [tex](x - c_{x})^{2} + (mx + b - c_{y})^2 [/tex]

    And hence in order to find the center of the circle we solve

    [tex](x - a_{x})^{2} + (mx + b - a_{y})^2 = (x - c_{x})^{2} + (mx + b - c_{y})^2 [/tex]

    which simplifies to

    [tex]{a_{x}}^{2} -2{a_{x}}x + (a_{y} -b)^2 - mx(a_{y} - b) =
    {c_{x}}^{2} -2{c_{x}}x + (c_{y} -b)^2 - mx(c_{y} - b) [/tex]

    Which is a first degree equation and hence it is solvable regardless of the vertice of the triangle.
     
    Last edited: Jun 13, 2007
  9. Jun 13, 2007 #8
    Werg22: You should have read post #6 before you went through all the trouble.:wink::biggrin:
     
  10. Sep 7, 2007 #9
    Solution to the problem

    Well, you only need to find the distances between these three points in 3D space, which correspond to the lengths of the triangle sides. This is an easy task. If we name these distances a, b, c then the radius R of the circumscribed circle is:

    [tex]
    R= \frac {abc}{\sqrt{2a^2b^2+2b^2c^2+2c^2a^2-a^4-b^4-c^4}}
    [/tex]

    When the points are colinear the quantity inside the square root becomes zero, and therefore the radius becomes infinite as it should.
     
  11. Oct 3, 2007 #10
    Now the 3D Center Point

    The above thread is helpful, but I'd like to add the question of now finding the coordinates of the circle center. The last replay by "Greek000" gives the solution for finding the Radius. Is there a simple solution for the coordinates?

    thanks,
    Rob
     
    Last edited: Oct 3, 2007
  12. May 27, 2008 #11
    Finding coordinates of the center

    Suppose we have 3 points p1,p2,p3. Make two vectors P1P2 and P2P3 .Using this two we can calculate normal to the plane formed by given 3 points. Say N is the normal.

    Now direction of bisector of p1 and p2 is given by cross product of b1 = P1P2 x N. Similarly for p2 and p3 is b2 = P2P3 x N.

    Now find equation of two bisector line using the midpoint of p1 and p2 and b1 vector. Similarly find another bisector . Solve them to get the center of circumcircle.
     
  13. May 27, 2008 #12
    ha i just suggested a solution to another problem that works for this one. you have 3 points

    solve the system of 3qns 3unknowns for a general cylinder for a,b,R:
    (x-az)^2+(y-bz)^2=R^2
     
  14. May 27, 2008 #13
    I would be glad if you could explain a little bit more on this problem. i.e. How can u get the coordinates of circumcenter using your method
     
  15. May 27, 2008 #14
    he didn't ask for the circum center, he asked for the radius
     
  16. May 28, 2008 #15
    Let the vectors from the origin to the 3 points you know be [itex]\vec{p}_1,\vec{p}_2,\vec{p}_3[/itex], and call the vector from the origin to the center point [itex]\vec{c}[/itex]. Our goal is to find [itex]\vec{c}[/itex].

    The vector from point 1 to the center, [itex]\vec{p}_1-\vec{c}[/itex], must be the same length as the vector from point 2 to the center, [itex]\vec{p}_2-\vec{c}[/itex], which must be the same length as the vector from point 3 to the center, [itex]\vec{p}_3-\vec{c}[/itex]. In other words, we have the following 3 equations:
    [tex]\left(\vec{c}-\vec{p}_1\right)\cdot\left(\vec{c}-\vec{p}_1\right)=\left(\vec{c}-\vec{p}_2\right)\cdot\left(\vec{c}-\vec{p}_2\right)[/tex]
    [tex]\left(\vec{c}-\vec{p}_1\right)\cdot\left(\vec{c}-\vec{p}_1\right)=\left(\vec{c}-\vec{p}_3\right)\cdot\left(\vec{c}-\vec{p}_3\right)[/tex]
    [tex]\left(\vec{c}-\vec{p}_2\right)\cdot\left(\vec{c}-\vec{p}_2\right)=\left(\vec{c}-\vec{p}_3\right)\cdot\left(\vec{c}-\vec{p}_3\right)[/tex]

    Focus on the first one. We can multiply this out and simplify (note the cancellation of [itex]\vec{c}\cdot\vec{c}[/itex]):
    [tex]\left(\vec{c}-\vec{p}_1\right)\cdot\left(\vec{c}-\vec{p}_1\right)=\left(\vec{c}-\vec{p}_2\right)\cdot\left(\vec{c}-\vec{p}_2\right)[/tex]
    [tex]-2\vec{c}\cdot\vec{p}_1+\vec{p}_1\cdot\vec{p}_1=-2\vec{c}\cdot\vec{p}_2+\vec{p}_2\cdot\vec{p}_2[/tex]
    [tex]\vec{c}\cdot\left(\vec{p}_2-\vec{p}_1\right)=\left(\vec{p}_1\cdot\vec{p}_1-\vec{p}_2\cdot\vec{p}_2\right)/2[/tex]

    The same thing could be done for the other 2 starting equations, in which case we get the following 3 results:
    [tex]\vec{c}\cdot\left(\vec{p}_2-\vec{p}_1\right)=\left(\vec{p}_1\cdot\vec{p}_1-\vec{p}_2\cdot\vec{p}_2\right)/2[/tex]
    [tex]\vec{c}\cdot\left(\vec{p}_3-\vec{p}_1\right)=\left(\vec{p}_1\cdot\vec{p}_1-\vec{p}_3\cdot\vec{p}_3\right)/2[/tex]
    [tex]\vec{c}\cdot\left(\vec{p}_3-\vec{p}_2\right)=\left(\vec{p}_2\cdot\vec{p}_2-\vec{p}_3\cdot\vec{p}_3\right)/2[/tex]

    If we recast these 3 equations in matrix form, we get,
    [tex]\left(\begin{matrix}\vec{p}_2-\vec{p}_1 \\ \vec{p}_3-\vec{p}_1 \\ \vec{p}_3-\vec{p}_2\end{matrix}\right)\cdot\vec{c} = \frac{1}{2}\left(\begin{matrix}\vec{p}_1\cdot\vec{p}_1-\vec{p}_2\cdot\vec{p}_2 \\ \vec{p}_1\cdot\vec{p}_1-\vec{p}_3\cdot\vec{p}_3 \\ \vec{p}_2\cdot\vec{p}_2-\vec{p}_3\cdot\vec{p}_3 \end{matrix}\right)[/tex]

    Then multiplying both sides by the matrix inverse, we get the center, [itex]\vec{c}[/itex].
    [tex]\vec{c} = \frac{1}{2}\left(\begin{matrix}\vec{p}_2-\vec{p}_1 \\ \vec{p}_3-\vec{p}_1 \\ \vec{p}_3-\vec{p}_2\end{matrix}\right)^{-1}\left(\begin{matrix}\vec{p}_1\cdot\vec{p}_1-\vec{p}_2\cdot\vec{p}_2 \\ \vec{p}_1\cdot\vec{p}_1-\vec{p}_3\cdot\vec{p}_3 \\ \vec{p}_2\cdot\vec{p}_2-\vec{p}_3\cdot\vec{p}_3 \end{matrix}\right)[/tex]

    You can find the radius by taking the length of the vector from the center to one of the points on the circle,
    [tex]R =\left|\vec{c}-\vec{p}_1\right|[/tex]
     
  17. Jul 17, 2008 #16
    I've been working on this problem for the last couple of days and I tried this method, but it didn't work. The 3 equations are not all independent, only two of them are, so when I tried to take the inverse of the 3x3 matrix, I couldn't because the determinant was zero.

    I solved the problem today with a different method. The center of the circle defined by 3 points can also be described as the orthocenter of the triangle formed by the three points. Mathworld had a relatively simple equation (http://mathworld.wolfram.com/BarycentricCoordinates.html) for the orthocenter in terms of barycentric coordinates, so I was able to find them, and then convert to rectangular coordinates.
     
  18. Jul 17, 2008 #17
    Interesting, thanks for the reply after so long. I suppose it would give a line of solutions through the center and perpendicular to the plane the points lie in.

    I think you could salvage it taking the intersection with the plane the points lie on.
     
  19. Jul 23, 2008 #18
    Hi!

    In order to define a circle in R^3 we need a normal vector, the radius and the centre point.

    Now, consider we had three non collinear points(A,B,C). I saw a very fast way to compute the radius (R), equally fast we can calculate the normal vector (n) (through the place by (ABC).

    What's left is the centre of the circumscribed circle: we take two of the the vectors representing the sides of the triangle (e.g. AB and BC). We calculate the midpoints. Now we're looking for lines, orthogonal to AB respectively BC which intersect each other at a point of the plane (ABC) (note that the lines have to lie in the plane as well). The point should be considered as the centre of the circumscribed circle.

    So we got all we need.

    What I haven't learnt about in my analytical geometry lessons at school last autumn is what the equation looks like?

    The equation of a circle in R^2 reads: (x-x_0)^2 + (y - y_0)^2 = r^2 , where:
    M(x_0 ; y_0) is the centre of the circle and r is it's radius.

    Can someone type the general equation in R^3 (and maybe also the equation of a sphere to make the difference more obvious)
     
  20. Apr 13, 2009 #19
    Re: Solution to the problem

    Thanks Greek000 - this was very helpful for me! Do you have a reference for that formula? I would like to cite something for it when I write up my work.
    Thanks again!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Equation of a circle through 3 points in 3D space
Loading...