674 Chapter 14 Distance Methods
quite large. In these cases consider uniformly scaling the data to O(1) as floating-
point numbers first, computing the distance, then rescaling to get the distance in the
original coordinates.
14.13.3 Point to Quadratic Curve or to Quadric Surface
This subsection describes an algorithm for computing the distance from a point in 2D
to a general quadratic curve defined implicitly by a second-degree quadratic equation
in two variables, or from a point in 3D to a general quadric surface defined implicitly
by a second-degree quadratic equation in three variables. I will use the term object to
refer to either a curve (in 2D) or a surface (in 3D).
The general quadratic equation is
Q(X) = X
T
AX + b
T
X + c = 0
where A is a symmetric ...