Results 1 to 7 of 7

Math Help - Coordinates of intersection of circle and sphere

  1. #1
    DSG
    DSG is offline
    Newbie
    Joined
    Mar 2008
    Posts
    13

    Coordinates of intersection of circle and sphere

    How do I calculate the x, y, & z coordinates of the two points where a sphere intersects a circle? The coordinates of the center of both are known and the radii are known.

    The center of the circle and the center of the sphere are not the same point.

    The circle and the sphere are not tangent to each other.

    The center of the sphere is not on the perpendicular through the center of the circle. I.e., the solution is not the circle, only two points.

    You may orient the circle as a rotation around an axis (but the sphere is not on the axis of rotation of course).

    DSG
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Feb 2008
    From
    Westwood, Los Angeles, CA
    Posts
    176
    Thanks
    1
    Why not give the specific problem statement (radii, centers, etc) - it would make the explanation much easier, I would think.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    DSG
    DSG is offline
    Newbie
    Joined
    Mar 2008
    Posts
    13
    I was looking for a general equation. The center of the circle can move along a line and will have various radii. The sphere has a fixed center in relation to the line, but it too will have varying radii.
    DSG
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Opalg's Avatar
    Joined
    Aug 2007
    From
    Leeds, UK
    Posts
    4,041
    Thanks
    7
    Quote Originally Posted by DSG View Post
    How do I calculate the x, y, & z coordinates of the two points where a sphere intersects a circle? The coordinates of the center of both are known and the radii are known.

    The center of the circle and the center of the sphere are not the same point.

    The circle and the sphere are not tangent to each other.

    The center of the sphere is not on the perpendicular through the center of the circle. I.e., the solution is not the circle, only two points.

    You may orient the circle as a rotation around an axis (but the sphere is not on the axis of rotation of course).
    The given circle C lies in a plane. The plane is determined by the location of the centre of C, together with a normal vector N (is that what you called the axis of rotation?).

    The plane containing C will meet the sphere in another circle Γ (assuming that this intersection is not empty). The centre of Γ will be a point P on a line through the centre of the sphere in the direction of N. Using that information, you can find the location of P, and hence its distance d from the centre of the sphere. If the radius of the sphere is r then the radius of Γ will be \sqrt{r^2-d^2} (by Pythagoras).

    Now you know the radius of Γ. You can also find the distance between the centres of C and Γ, and you also know the radius of C. So that reduces the whole problem to a simple one of finding the intersection of two circles in a plane.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    DSG
    DSG is offline
    Newbie
    Joined
    Mar 2008
    Posts
    13
    Opalg,
    Slicing the sphere into a circle on the same plane as the original circle helped me understand the solution.
    Thanks for the help,
    DSG
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Newbie
    Joined
    Mar 2008
    Posts
    1

    algorithmic geometry solution

    For this, you need to have already solved the general intersection of two 2D circles as a 2D algorithm (able to handle all cases):

    Given: SPH = [ c r ] CIR = [ c orient r ]
    Solve: numIntersectionPts (0,1,2,infinite), i1 i2

    1. Translate coordinates adopting CIR.c as newOrigin (compute SPH --> SPH')
    SPH' = Translate(CIR.c, SPH)
    2. Rotate coordinates adopting CIR.orient as the newZaxis (compute SPH' --> SPH")
    Rotator R = RotatorForNewZAt(CIR.orient)
    SPH" = Rotate(R, SPH')
    3. Now, CIR" lies flat in x"-y" plane centered at origin.
    4. Visualize 2nd circle where x"-y" plane cuts thru SPH"
    if (abs(SPH".c.z) > SPH.r) numIntersectionPts = 0; return; // SPH too distant from x'=y" plane
    5. Solve i1" i2" in 2D as the intersection of these two circles:
    cir1 = [ 0 0 ] CIR.r
    cir2 = [ SPH".c.x SPH".c.y ] sqrt(sqr(SPH.r) - sqr(SPH".c.z))
    numIntersectionPts = IntersectionOf(cir1, cir2, /*returns*/ i1", i2")
    6. If numIntersectionPts == 1 or 2,
    back-transform solution points into original coordinates:
    i1 = Untranslate(CIR.c, Unrotate(R, i1"))
    i2 = Untranslate(CIR.c, Unrotate(R, i2"))

    This is a general solution (works in all cases).

    Illustrated solution in: Flexing the Power of Algorithmic Geometry by Pierre Bierre
    Follow Math Help Forum on Facebook and Google+

  7. #7
    DSG
    DSG is offline
    Newbie
    Joined
    Mar 2008
    Posts
    13
    Thanks Pierre.
    DSG
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Line, sphere intersection.
    Posted in the Geometry Forum
    Replies: 1
    Last Post: April 30th 2011, 07:22 PM
  2. Intersection of Plane and Sphere
    Posted in the Geometry Forum
    Replies: 1
    Last Post: December 19th 2010, 11:57 AM
  3. Intersection of two sphere
    Posted in the Calculus Forum
    Replies: 1
    Last Post: November 5th 2010, 01:29 AM
  4. Intersection of plane with sphere
    Posted in the Geometry Forum
    Replies: 8
    Last Post: October 12th 2010, 08:46 AM
  5. Coordinates of intersection of a line and circle?
    Posted in the Math Topics Forum
    Replies: 8
    Last Post: May 4th 2008, 11:41 PM

Search Tags


/mathhelpforum @mathhelpforum