Express the string as a function t:
{ x(t) = x0*(1-t) + t*x1
{ y(t) = y0*(1-t) + t*y1
{ z(t) = z0*(1-t) + t*z1
When t = 0, he will be at one endpoint (x0,y0,z0). When t = 1, he will be at another endpoint (x1,y1,z1).
Write the formula for the distance to the center of the sphere (squared) in t(where (xc,yc,zc)is the center of the sphere):
f(t) = (x(t) - xc)^2 + (y(t) - yc)^2 + (z(t) - zc)^2
Solve for twhen f(t)equals R^2( R- the radius of the sphere):
(x(t) - xc)^2 + (y(t) - yc)^2 + (z(t) - zc)^2 = R^2
A = (x0-xc)^2 + (y0-yc)^2 + (z0-zc)^2 - R^2
B = (x1-xc)^2 + (y1-yc)^2 + (z1-zc)^2 - A - C - R^2
C = (x0-x1)^2 + (y0-y1)^2 + (z0-z1)^2
A + B*t + C*t^2 = 0 t. .
. , t 0 1, .
t, , .
, ( ). ( ), ( ) . t - , 0 1.
: B. . M Katz, , .