Sphere equation.
|
The equation of a sphere with center at point (h, k, l) is:
(x − h)2 + (y − k)2 + (z − l)2 = r2
The equivalent form of sphere equation is:
x2 + y2 + z2 + Dx + Ey + Fz + G = 0
The relations between the coefficients are:
D = − 2h E = − 2k F = − 2l G = h2 + k2 + l2 − r2
|
The angle θ between two points
P1 (x1 , y1 , z1) and P2 (x2 , y2 , z2)
both points lays on the sphere.
|
The arc length between those two points is: L = θr
|
The equation of sphere passing through 4 points: P1 (x1 , y1 , z1)
P2 (x2 , y2 , z2) , P3
(x3 , y3 , z3) and P4 (x4 , y4 , z4).
|
Because each point is located on the sphere, we get 4 equations with the unknowns coefficients D, E, F and G they can be valuated by solving the
system of the equations by matrix methods (Cramer's rule).
Where: |
t1 = −(x12 + y12 + z12) |
t2 = −(x22 + y22+ z22) |
t3 =−(x32 + y32 + z32) |
t4 =−(x42 + y42 + z42) |
T is the determinant value |
T = |
|
The center of the sphere is at coordinate: |
|
The radius of the sphere is: |
|
|