Results 1 to 5 of 5

Math Help - Distance between point a and intersection of a sphere

  1. #1
    Newbie
    Joined
    Oct 2012
    From
    UK
    Posts
    3

    Distance between point a and intersection of a sphere

    Hi all,

    Not even sure this is in the right category applogies if it isnt.
    Just wondered if someone could help me with an issue that i cannot seem to figure out below is an image excuse how crude it is, but i think it explains what im trying to do.

    Distance between point a and intersection of a sphere-line_entry_point.jpg

    Im trying to get the distance from point A to entry point of the "circle/sphere" designated B i also want to get the distance from point A to the exit point of the "circle/sphere" designated B on both paths to C and D.

    The Radius of "circle/sphere" B = 162

    Total distance from A to B is 326
    Total distance from A to C = 461
    Total distance from A to D = 621

    X,Y,Z coord are as shown on image.

    Hope this is enough information for anybody willing to help me out.

    If someone could explain how to do this in as simple terms as possible i would be very greatfull.
    Im not that great at maths but im keen to learn.

    Many thanks in advance.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Sep 2012
    From
    Washington DC USA
    Posts
    525
    Thanks
    146

    Re: Distance between point a and intersection of a sphere

    What you have is a line intersecting a circle (or sphere in 3 dimensions). A point of intersection (x,y) is both on the line and on the circle, so satisfies the equation for both. You end up with a non-linear system of 2 equations (one quadratic, one linear) in two unknowns (x and y). Solving that system gives you your points of intersection:

    Circle: (x-405)^2 + (y-216)^2 = 162^2

    Line AC: line through (100, 100) and (461, 53):

    slope = \frac{100-53}{100-461} = -\frac{47}{361}, so it's y-100 = -\frac{47}{361} (x - 100), so

    y = -\frac{47}{361} (x - 100) + 100 = -\frac{47}{361} x + \frac{4700}{361} + \frac{36100}{361} = -\frac{47}{361} x + \frac{40800}{361}

    System of equations is:

    (x-405)^2 + (y-216)^2 = 162^2 and y = -\frac{47}{361} x + \frac{40800}{361}.

    Plug the expression for y given by the 2nd equation into the first equation, and, after expanding and then collecting like terms, it becomes a quadratic equation for x, which has two solutions (hopefully - according to the picture). For each solution for x, use the second equation to find the value of y. This is how you find the two points of intersection (x,y).
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Oct 2012
    From
    UK
    Posts
    3

    Re: Distance between point a and intersection of a sphere

    Thanks for the reply, how would i add the third dimension into this equasion?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member
    Joined
    Sep 2012
    From
    Washington DC USA
    Posts
    525
    Thanks
    146

    Re: Distance between point a and intersection of a sphere

    z = 100 for all the points in question, so z=100 is the z coordinate of the solution. It's all takeing place in the plane z=100.

    In general, given a line in 3 space and a 2-dimensional sphere in 3 space, you'd probably want to describe the line parametrically (although vector notation is cleaner, it's also less "algebraic" and might seem confusing), and then solve for that parameter to get the points of intersection:

    Line: x(t) = a_xt+b_x, y(t) = a_yt + b_y, z(t) = a_zt + b_z

    Sphere: (x - c_x)^2 + (y-c_y)^2 + (z - c_z)^2 = R^2.

    So substitute, expland, collect like terms, and then solve for t:

    Substitute:

    ((a_xt+b_x) - c_x)^2 + ((a_yt+b_y)-c_y)^2 + ((a_xt+b_x) - c_z)^2 = R^2.

    Expand:

    [a_x^2t^2 + 2(a_x)(b_x - c_x)t +(b_x - c_x)^2]

    + [a_y^2t^2 + 2(a_y)(b_y - c_y)t +(b_y - c_y)^2]

    + [a_z^2t^2 + 2(a_z)(b_z - c_z)t +(b_z - c_z)^2]

    = R^2.

    Collect like terms:

    [a_x^2 + a_y^2 + a_z^2] \ t^2

    + 2[a_x(b_x - c_x) + a_y(b_y - c_y) + a_z(b_z - c_z)] \ t

    +[(b_x - c_x)^2 + (b_y - c_y)^2 + (b_z - c_z)^2 - R^2]

    = 0

    Solve:

    t = \frac{-2[a_x(b_x - c_x) + a_y(b_y - c_y) + a_z(b_z - c_z)] \pm \sqrt{4D}}{2(a_x^2 + a_y^2 + a_z^2)}, where

    4D = (2[a_x(b_x - c_x) + a_y(b_y - c_y) + a_z(b_z - c_z)])^2

    - 4(a_x^2 + a_y^2 + a_z^2)((b_x - c_x)^2

    + (b_y - c_y)^2 + (b_z - c_z)^2).

    Simplifying a bit:

    t = \frac{-[a_x(b_x - c_x) + a_y(b_y - c_y) + a_z(b_z - c_z)] \pm \sqrt{D}}{a_x^2 + a_y^2 + a_z^2}, where

    D = (a_x(b_x - c_x) + a_y(b_y - c_y) + a_z(b_z - c_z))^2

    - (a_x^2 + a_y^2 + a_z^2)[(b_x - c_x)^2 + (b_y - c_y)^2 + (b_z - c_z)^2].
    Last edited by johnsomeone; October 15th 2012 at 11:51 AM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member
    Joined
    Sep 2012
    From
    Washington DC USA
    Posts
    525
    Thanks
    146

    Re: Distance between point a and intersection of a sphere

    That has a mistake. If you look at those equations for D, I left out the -R^2.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 2
    Last Post: September 16th 2011, 04:05 AM
  2. maximum distance from point to sphere
    Posted in the Advanced Algebra Forum
    Replies: 7
    Last Post: January 31st 2011, 04:25 PM
  3. Intersection of two sphere
    Posted in the Calculus Forum
    Replies: 1
    Last Post: November 5th 2010, 01:29 AM
  4. Replies: 4
    Last Post: September 8th 2010, 09:13 AM
  5. Intersection of a sphere with xz plane
    Posted in the Calculus Forum
    Replies: 1
    Last Post: August 24th 2010, 03:20 PM

Search Tags


/mathhelpforum @mathhelpforum