In 3D geometry, two lines that are neither parallel nor intersecting are called **skew lines**. The shortest distance between them is the length of the line segment that is perpendicular to both lines.
Let the two skew lines L₁ and L₂ be given by:
L₁: (x - x₁)/l₁ = (y - y₁)/m₁ = (z - z₁)/n₁
L₂: (x - x₂)/l₂ = (y - y₂)/m₂ = (z - z₂)/n₂
The shortest distance (S.D.) between L₁ and L₂ is the projection of the line segment joining (x₁, y₁, z₁) and (x₂, y₂, z₂) onto the line of shortest distance.
The direction cosines (l, m, n) of the shortest distance line are proportional to (m₁n₂ - m₂n₁), (n₁l₂ - n₂l₁), (l₁m₂ - l₂m₁).
The formula for the shortest distance is:
S.D. = | (x₂ - x₁)l + (y₂ - y₁)m + (z₂ - z₁)n |
where l, m, n are the actual direction cosines (not ratios) of the S.D. line.
A more direct formula using a determinant is:
S.D. = | Determinant | / sqrt(Σ(m₁n₂ - m₂n₁)² )
where Determinant =
x₂ - x₁ y₂ - y₁ z₂ - z₁ l₁ m₁ n₁ l₂ m₂ n₂
The denominator sqrt(Σ(m₁n₂ - m₂n₁)²) is the magnitude of the cross product of the direction vectors, which is sqrt((m₁n₂ - m₂n₁)² + (n₁l₂ - n₂l₁)² + (l₁m₂ - l₂m₁)²).
If S.D. = 0, the lines are coplanar (either intersecting or parallel).
The line of shortest distance is defined as the intersection of two planes:
The equation of Plane 1 is given by the determinant:
= 0
x - x₁ y - y₁ z - z₁ l₁ m₁ n₁ l m n
The equation of Plane 2 is given by the determinant:
= 0
x - x₂ y - y₂ z - z₂ l₂ m₂ n₂ l m n
where (l, m, n) are the direction ratios of the S.D. line, found by l = m₁n₂ - m₂n₁, etc.
A sphere is the locus of a point in 3D space that is at a constant distance (the radius) from a fixed point (the center).
(a, b, c) and the radius is r, the equation is:
(x - a)² + (y - b)² + (z - c)² = r²
x² + y² + z² + 2ux + 2vy + 2wz + d = 0
For the general equation:
(-u, -v, -w)r = sqrt(u² + v² + w² - d)x², y², and z² are equal (usually 1).xy, yz, zx).This is a sphere that passes through the origin (0, 0, 0) and makes intercepts a, b, and c on the x, y, and z axes, respectively.
This means the sphere passes through the four points:
(0, 0, 0), (a, 0, 0), (0, b, 0), and (0, 0, c).
Substituting these points into the general equation gives d=0, u=-a/2, v=-b/2, and w=-c/2.
The equation of such a sphere is:
x² + y² + z² - ax - by - cz = 0
Its center is (a/2, b/2, c/2).
The intersection of a sphere and a plane is always a **circle**.
Let the sphere have center C and radius R. Let the plane be at a perpendicular distance p from C.
r of the circle is given by Pythagoras' theorem:
r² = R² - p²
A **great circle** is the largest possible circle that can be drawn on a sphere. It is the section of the sphere by a plane that passes *through the center* of the sphere.
For a great circle, the perpendicular distance p = 0, so its radius r = R (the radius of the sphere).
A circle in 3D is not defined by a single equation. It is defined by the intersection of two surfaces, usually a sphere and a plane.
Let the circle be defined by:
Sphere: S ≡ x² + y² + z² + 2ux + 2vy + 2wz + d = 0
Plane: P ≡ Lx + My + Nz + Q = 0
The equation of *any* sphere passing through this circle is:
S + kP = 0
where k is a parameter. By changing k, we get different spheres all containing that same circle.
The curve of intersection of two spheres, S₁ = 0 and S₂ = 0, is also a circle.
This circle lies on a plane called the **radical plane**, whose equation is:
P ≡ S₁ - S₂ = 0
(Note: The x², y², z² terms will cancel, leaving a linear equation, which is a plane).
So, the intersection circle is defined by the system: S₁ = 0 and S₁ - S₂ = 0 (or S₂ = 0 and S₁ - S₂ = 0).
The equation of the tangent plane to the sphere S = x² + y² + z² + 2ux + 2vy + 2wz + d = 0 at a point (x₁, y₁, z₁) on its surface is given by the T = 0 rule:
The rule involves substitutions:
x² → x·x₁y² → y·y₁z² → z·z₁2x → x + x₁2y → y + y₁2z → z + z₁This gives the equation of the tangent plane:
x·x₁ + y·y₁ + z·z₁ + u(x + x₁) + v(y + y₁) + w(z + z₁) + d = 0
A given plane Lx + My + Nz + P = 0 will be a tangent plane (i.e., just touch) a given sphere if and only if:
The perpendicular distance from the center of the sphere to the plane is equal to the radius of the sphere.
Let the sphere be x² + y² + z² + 2ux + 2vy + 2wz + d = 0.
Center C = (-u, -v, -w)
Radius r = sqrt(u² + v² + w² - d)
Perpendicular distance p from C to the plane is:
p = | L(-u) + M(-v) + N(-w) + P | / sqrt(L² + M² + N²)
The **condition of tangency** is:
p = r
( | -Lu - Mv - Nw + P | / sqrt(L² + M² + N²) )² = u² + v² + w² - d
x² + y² + z² + 2ux + 2vy + 2wz + d = 0
(-u, -v, -w)sqrt(u² + v² + w² - d)S + kP = 0S₁ - S₂ = 0.