Solid geometry: coordinate systems, sphere, cone and cylinder
Solid geometry of 3D coordinate systems and standard quadratic surfaces: sphere, cone, and cylinder—definitions, equations, transformations, and typical exam derivations.
Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.
Why it matters
Engineers model real 3D objects—pipes, tanks, lenses, nozzles, tunnels, and robot workspaces—using spheres, cones, and cylinders. Understanding coordinates and surface equations is essential for CAD, stress analysis, robotics, and for setting up integrals in mechanics and heat transfer.
Key ideas
Cylindrical coordinates: A coordinate system (r, θ, z) where r ≥ 0 is the distance from the Z-axis, θ is the angle in the XY-plane measured from +X (in radians), and z is the same as Cartesian z. Relations: x = r cos θ, y = r sin θ, z = z. Typical range for θ: (−π, π] or [0, 2π); state your convention. Used for surfaces with circular symmetry about the Z-axis (e.g., cylinders, cones).
Spherical coordinates: A coordinate system (ρ, θ, φ) where ρ ≥ 0 is the distance from the origin, θ is the azimuth in the XY-plane from +X (radians), and φ is the polar angle from the +Z-axis (0 ≤ φ ≤ π). Typical θ range: (−π, π] or [0, 2π). Relations: x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ. Used for spheres and radially symmetric fields.
Distance in 3D: For points A(x₁, y₁, z₁) and B(x₂, y₂, z₂), the distance AB = √[(x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²]. Units: metres (m).
Direction cosines: For a directed line with direction ratios proportional to (l, m, n), the cosines of angles with +X, +Y, +Z are α, β, γ satisfying l/|d| = cos α, m/|d| = cos β, n/|d| = cos γ, where |d| = √(l² + m² + n²). They satisfy cos²α + cos²β + cos²γ = 1. These are useful to express axes of cones and cylinders.
Sphere: The set of all points in space at a fixed distance R (radius) from a fixed point C(a, b, c) (center). Standard equation: (x − a)² + (y − b)² + (z − c)² = R².
General equation of a sphere: Any sphere in Cartesian form can be written as x² + y² + z² + 2ux + 2vy + 2wz + d = 0. Its center is (−u, −v, −w) and radius R satisfies R² = u² + v² + w² − d. Condition to represent a real sphere: u² + v² + w² − d > 0.
Diameter form of a sphere: If A(x₁, y₁, z₁) and B(x₂, y₂, z₂) are endpoints of a diameter of a sphere, then every point P(x, y, z) on the sphere satisfies (x − x₁)(x − x₂) + (y − y₁)(y − y₂) + (z − z₁)(z − z₂) = 0. Derivation: For OP ⟂ AB when P is on the sphere with diameter AB (Thales’ theorem generalized). Expanding the perpendicularity condition (P − A)·(P − B) = 0 gives the stated equation.
Tangent plane to a sphere: For sphere (x − a)² + (y − b)² + (z − c)² = R² and a point of tangency P(x₁, y₁, z₁) on it, the tangent plane is (x − a)(x₁ − a) + (y − b)(y₁ − b) + (z − c)(z₁ − c) = R². The normal vector is CP = (x₁ − a, y₁ − b, z₁ − c).
Length of tangent from an external point to a sphere: If Q is any point with CQ = d and the sphere has radius R, the length of each tangent segment from Q to the sphere is L = √(d² − R²).
Plane section of a sphere: The intersection of a sphere with a plane is a circle. If the plane is at perpendicular distance p from the center C and the sphere has radius R, the circle’s radius is r = √(R² − p²) and its center is the foot of the perpendicular from C to the plane. This follows from right-triangle geometry.
Radical plane of two spheres: For spheres S₁: x² + y² + z² + 2u₁x + 2v₁y + 2w₁z + d₁ = 0 and S₂: x² + y² + z² + 2u₂x + 2v₂y + 2w₂z + d₂ = 0, subtracting gives a plane: 2(u₁ − u₂)x + 2(v₁ − v₂)y + 2(w₁ − w₂)z + (d₁ − d₂) = 0. This plane consists of points having equal power with respect to both spheres, and is the plane of their circle of intersection when they intersect.
Right circular cone (general axis form): A surface generated by all straight lines (generators) through a fixed point V (vertex) making a constant angle α (semi-vertical angle) with a fixed axis line. If the axis passes through V and is a unit vector â = (l, m, n), and r = (x, y, z) is a point from V = origin, then the angle between r and â is α, so (r·â)² = |r|² cos²α. In Cartesian form with vertex at origin: (lx + my + nz)² = (x² + y² + z²) cos²α.
Right circular cone (standard orientation): Vertex at origin, axis along +Z, semi-vertical angle α. At height z, the radius in the XY-plane is |z| tan α, so x² + y² = z² tan²α.
Homogeneous quadratic cone: A second-degree homogeneous equation f(x, y, z) = 0 represents a cone with vertex at the origin (all terms are degree 2 and there is no constant or linear term). For example, Ax² + By² + Cz² + 2Fyz + 2Gzx + 2Hxy = 0 is a cone with vertex at O.
Cylinder (general definition): A surface generated by a straight line (generator) moving parallel to a fixed direction (axis direction) and constrained to pass along a fixed planar curve (directrix). If the axis direction is parallel to a unit vector â and the equation of the cylinder does not involve the coordinate along â, it represents a cylinder whose generators are parallel to â.
Right circular cylinder (standard orientation): Axis along +Z and radius R: x² + y² = R², independent of z. If the axis is along a generic unit vector â, the equation remains independent of coordinate along â after rotating axes to align â with the new Z-axis. In vector form (axis direction â through point r₀), a right circular cylinder of radius R is |(r − r₀) × â|² = R².
Diagram descriptions commonly required:
- Sphere and tangent plane: Draw a sphere centered at C(a, b, c). Mark a point P on the surface. Draw radius CP (normal). Draw the tangent plane touching at P. Label CP = R and show right angle between CP and the plane.
- Plane section of sphere: Draw sphere with a cutting plane. Drop perpendicular from C to the plane at point H. Draw the circle of intersection with center H and radius r. Label distances R, p, and r with R² = p² + r².
- Right circular cone: Draw vertex at origin O, axis along +Z. Show generator line making angle α with axis. At level z, draw a circle of radius |z| tan α.
- Right circular cylinder: Axis along +Z, two circles at z = z₁ and z = z₂ of radius R; connect with parallel generators.
Assumptions used throughout: Euclidean 3D space, SI units for lengths (m), angles in radians, right-handed coordinate system.
Formulas
x = r cos θ, y = r sin θ, z = z
- Cylindrical to Cartesian. r (m), θ (rad), z (m). For axial symmetry about Z.
r = √(x² + y²), θ = atan2(y, x), z = z
- Cartesian to cylindrical. atan2 gives correct quadrant. x, y, z in m; θ in rad.
x = ρ sin φ cos θ, y = ρ sin φ sin θ, z = ρ cos φ
- Spherical to Cartesian. ρ (m), φ (rad from +Z), θ (rad in XY-plane).
ρ = √(x² + y² + z²), θ = atan2(y, x), φ = arccos(z / ρ)
- Cartesian to spherical. Valid for ρ > 0. x, y, z in m; angles in rad.
AB = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²)
- Distance between A and B. Result in metres. Always valid in Euclidean space.
(x − a)² + (y − b)² + (z − c)² = R²
- Sphere with center C(a, b, c) and radius R (m). For all points on the sphere.
x² + y² + z² + 2ux + 2vy + 2wz + d = 0
- General sphere. Center (−u, −v, −w) (m), radius R where
R² = u² + v² + w² − d(m²). Real sphere ifu² + v² + w² − d > 0.
(x − x₁)(x − x₂) + (y − y₁)(y − y₂) + (z − z₁)(z − z₂) = 0
- Diameter form of a sphere with endpoints A(x₁, y₁, z₁), B(x₂, y₂, z₂). All in metres.
(x − a)(x₁ − a) + (y − b)(y₁ − b) + (z − c)(z₁ − c) = R²
- Tangent plane to sphere at P(x₁, y₁, z₁). a, b, c in m; R in m.
xx₁ + yy₁ + zz₁ + u(x + x₁) + v(y + y₁) + w(z + z₁) + d = 0
- Tangent plane to the general sphere x² + y² + z² + 2ux + 2vy + 2wz + d = 0 at P(x₁, y₁, z₁) on it.
L = √(d² − R²)
- Length of tangent from an external point to a sphere. d = distance from center to the point (m), R radius (m). Valid for d ≥ R.
r = √(R² − p²)
- Radius of circle cut by a plane at perpendicular distance p (m) from center of a sphere of radius R (m). Valid for 0 ≤ p ≤ R.
(lx + my + nz)² = (x² + y² + z²) cos²α
- Cone with vertex at origin, axis direction cosines (l, m, n), semi-vertical angle α (rad). x, y, z in m. â must be unit length.
x² + y² = z² tan²α
- Right circular cone, axis along Z, vertex at origin, semi-vertical angle α (rad). x, y, z in m.
Ax² + By² + Cz² + 2Fyz + 2Gzx + 2Hxy = 0
- General homogeneous quadratic cone with vertex at origin. Coefficients dimensionless in pure geometry; x, y, z in m.
x² + y² = R²
- Right circular cylinder of radius R (m), axis along Z. Independent of z.
Worked examples
Example 1: Coordinate conversions and distances
- Given: Point P has Cartesian coordinates (x, y, z) = (−3.0 m, 3.0 m, 4.0 m).
- Convert P to cylindrical (r, θ, z).
- Convert P to spherical (ρ, θ, φ).
- Compute distance from origin O to P, and verify with ρ.
Solution
- Cylindrical:
- Formula: r = √(x² + y²), θ = atan2(y, x), z = z.
- Numbers: r = √((−3.0)² + 3.0²) m = √(9 + 9) m = √18 m = 4.2426407 m (≈ 4.2426 m).
- Angle: θ = atan2(3.0, −3.0) = 3π/4 rad = 2.3561945 rad (≈ 2.3562 rad).
- z = 4.0 m.
- Answer: (r, θ, z) = (4.2426 m, 2.3562 rad, 4.0 m).
- Spherical:
- Formula: ρ = √(x² + y² + z²), θ = atan2(y, x), φ = arccos(z / ρ).
- Numbers: ρ = √(9 + 9 + 16) m = √34 m = 5.8309519 m (≈ 5.8310 m).
- θ same as above = 2.3562 rad.
- φ = arccos(4.0 / 5.8310) = arccos(0.685994) = 0.812 rad (≈ 0.8120 rad).
- Answer: (ρ, θ, φ) = (5.8310 m, 2.3562 rad, 0.8120 rad).
- Distance O to P:
- Formula: OP = √(x² + y² + z²) = ρ.
- Numbers: OP = √34 m = 5.8310 m.
- Check: Matches ρ. Final: 5.8310 m.
Example 2: Sphere from diameter endpoints; tangent plane and circle of section
- Given: Endpoints of a sphere’s diameter A(1.0 m, −1.0 m, 2.0 m) and B(5.0 m, 3.0 m, 6.0 m).
- Find the equation of the sphere.
- Find the equation of the tangent plane at point A on the sphere (i.e., at A(1.0 m, −1.0 m, 2.0 m)).
- A plane Π: x + y + z = 9 (units consistent with metres) cuts the sphere in a circle. Find the circle’s center and radius.
Solution
- Diameter form then center-radius form:
- Center C = midpoint of AB: C = ((1 + 5)/2, (−1 + 3)/2, (2 + 6)/2) m = (3.0, 1.0, 4.0) m.
- Radius R = |CA| = √((3 − 1)² + (1 − (−1))² + (4 − 2)²) m = √(2² + 2² + 2²) m = √12 m = 3.4641016 m (≈ 3.4641 m).
- Equation: (x − 3)² + (y − 1)² + (z − 4)² = (3.4641)² = 12.
- Check: The point (3, 1, 4) is the center, not a surface point, since plugging into the left-hand side gives 0 whereas the right-hand side is 12.
- Tangent plane at A: Using the tangent plane formula with center C(a, b, c) = (3, 1, 4) and R² = 12 at A(1, −1, 2):
- (x − a)(x₁ − a) + (y − b)(y₁ − b) + (z − c)(z₁ − c) = R² ⇒ (x − 3)(1 − 3) + (y − 1)(−1 − 1) + (z − 4)(2 − 4) = 12 ⇒ x + y + z = 2.
- Circle of section by plane Π: x + y + z = 9.
- Distance from center to plane: p = |(1·3 + 1·1 + 1·4 − 9)| / √(1² + 1² + 1²) m = |(8 − 9)| / √3 m = 1/√3 m = 0.57735 m.
- Circle radius: r = √(R² − p²) = √(12 − (1/3)) m = √(35/3) m = √11.6667 m = 3.41565 m (≈ 3.4157 m).
- Center of circle: foot H from C to plane Π. Direction normal n = (1, 1, 1). Unit normal n̂ = (1, 1, 1)/√3. Vector from C to plane along −n̂ has length p with sign: H = C − ((n·C − 9)/‖n‖²) n = (3, 1, 4) − ((8 − 9)/3)(1, 1, 1) = (3, 1, 4) − (−1/3)(1, 1, 1) = (3 + 1/3, 1 + 1/3, 4 + 1/3) m = (3.3333, 1.3333, 4.3333) m.
- Final: Circle center H ≈ (3.3333 m, 1.3333 m, 4.3333 m), radius 3.4157 m.
Example 3: Right circular cone and cylinder equations from geometry
- Given: A right circular cone has vertex at origin, axis along the unit vector â with direction cosines (l, m, n) = (0, 0, 1), and semi-vertical angle α = 30°. A right circular cylinder has the same axis and radius R = 2.5 m.
- Write equations of the cone and cylinder.
- Find the intersection curve between the cone and plane z = 5.0 m, and between the cylinder and the same plane.
Solution
- Equations:
- Cone (axis along Z): x² + y² = z² tan²α. With α = 30° = π/6 rad, tan α = 1/√3 ≈ 0.57735. So: x² + y² = (z²)(1/3).
- Cylinder (axis along Z, radius R): x² + y² = R² = (2.5 m)² = 6.25 m².
- Intersections with plane z = 5.0 m:
- Cone section: At z = 5.0 m, radius r = |z| tan α = 5.0 × 0.57735 m = 2.88675 m. Equation in the plane: x² + y² = (2.88675 m)² = 8.3333 m². Curve is a circle of radius 2.8868 m.
- Cylinder section: At z = 5.0 m, equation remains x² + y² = 6.25 m². Curve is a circle of radius 2.5 m.
Common mistakes
- Forgetting radians: Writing angles in degrees inside trig functions during derivations. State degrees only for final interpretation; use radians if differentiating or integrating.
- Using non-unit axis direction in cone formula: The formula (lx + my + nz)² = (x² + y² + z²) cos²α requires (l, m, n) to be direction cosines (unit vector). If not unit, normalize first.
- Tangent plane at the center of a sphere: A tangent plane cannot be defined at the center. In tangent problems, ensure the point lies on the sphere.
- Sign errors in radical plane and distance-to-plane: Forgetting absolute value in distance or incorrect subtraction when forming the radical plane (subtract S₂ from S₁ consistently).
- Omitting independence from an axis for cylinders: A right circular cylinder parallel to Z must have an equation independent of z. If z appears, it is not a cylinder aligned with Z.
- Arithmetic slips: Wrong squares or roots (e.g., √12 ≈ 3.4641). Keep at least 4 significant figures through steps, round at the end.
For your exam
- Derivations:
- Derive general sphere center and radius from x² + y² + z² + 2ux + 2vy + 2wz + d = 0 by completing squares.
- Prove diameter form (P − A)·(P − B) = 0 for a sphere with diameter AB.
- Derive right circular cone: x² + y² = z² tan²α and general axis form (lx + my + nz)² = (x² + y² + z²) cos²α.
- Show that a homogeneous quadratic represents a cone with vertex at origin.
- Derive circle-of-section radius r = √(R² − p²) for a plane cutting a sphere.
- Numericals:
- Convert coordinates between systems; compute distances/angles.
- Find equation of sphere from data: center and radius, diameter endpoints, or tangent plane condition.
- Find tangent plane at a given point; find length of tangent from an external point.
- Find equation of a cone/cylinder from geometric conditions (axis, angle, radius).
- Diagrams: Sphere with tangent plane and section; cone and cylinder with axis and generators. Full marks: correctly labeled centers, radii, angles, distances, and normals.
Tips for full marks: State assumptions, write the formula before substitution, keep SI units, include a small diagram when asked, and check reasonableness (e.g., r ≤ R in a section of a sphere).
Quick check
- Write the relation between Cartesian and cylindrical coordinates for x and y, and state the range of θ you will use in exams.
- The sphere x² + y² + z² − 4x + 6y − 2z − 11 = 0 has what center and radius?
- Write the equation of a right circular cone with vertex at origin, axis along +Z, semi-vertical angle 45°.
Answers: 1) x = r cos θ, y = r sin θ; usually θ ∈ (−π, π] or [0, 2π) stated clearly. 2) Center (2, −3, 1), radius √(4 + 9 + 1 − (−11)) = √25 = 5. 3) x² + y² = z² tan²45° = z².
Finished this topic? Mark it so your progress, study plan and readiness keep up.
Stuck on something here?