1 Attachment(s)

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.

Attachment 25185

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.

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:

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

slope = , so it's , so

System of equations is:

and .

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).

Re: Distance between point a and intersection of a sphere

Thanks for the reply, how would i add the third dimension into this equasion?

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:

Sphere: .

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

Substitute:

.

Expand:

.

Collect like terms:

Solve:

, where

.

Simplifying a bit:

, where

.

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 .