Next Article in Journal
Space Analyticity and Bounds for Derivatives of Solutions to the Evolutionary Equations of Diffusive Magnetohydrodynamics
Next Article in Special Issue
Discovering Geometric Inequalities: The Concourse of GeoGebra Discovery, Dynamic Coloring and Maple Tools
Previous Article in Journal
Changes in Consumers’ Purchase Patterns as a Consequence of the COVID-19 Pandemic
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

On the Implicit Equation of Conics and Quadrics Offsets

by
Jorge Caravantes
1,
Gema M. Diaz-Toca
2,*,
Mario Fioravanti
3 and
Laureano Gonzalez-Vega
4
1
Departamento de Física y Matemáticas, Universidad de Alcalá, 28805 Madrid, Spain
2
Departamento de Ingeniería y Tecnología de Computadores, Universidad de Murcia, 30100 Murcia, Spain
3
Departamento de Matemáticas, Estadística y Computación, Universidad de Cantabria, 39005 Santander, Spain
4
Departamento de Métodos Cuantitativos, CUNEF Universidad, 28040 Madrid, Spain
*
Author to whom correspondence should be addressed.
Mathematics 2021, 9(15), 1784; https://doi.org/10.3390/math9151784
Submission received: 17 June 2021 / Revised: 21 July 2021 / Accepted: 25 July 2021 / Published: 28 July 2021
(This article belongs to the Special Issue Symbolic Computation for Mathematical Visualization)

Abstract

:
A new determinantal representation for the implicit equation of offsets to conics and quadrics is derived. It is simple, free of extraneous components and provides a very compact expanded form, these representations being very useful when dealing with geometric queries about offsets such as point positioning or solving intersection purposes. It is based on several classical results in “A Treatise on the Analytic Geometry of Three Dimensions” by G. Salmon for offsets to non-degenerate conics and central quadrics.

1. Introduction

Let δ > 0 be a fixed real number. Given a curve C in R 2 or a surface S in R 3 , their respective δ -offset, denoted by C δ and S δ , is the locus of the points that are at constant Euclidean distance δ , measured along the normal line, from the curve C or surface S .
Offsets have a variety of useful applications in computer-aided design, such as tool path control, geometric modeling, NC milling, design of surfaces with homogeneous thickness and tolerance analysis in manufacturing (see, for example, Ref. [1,2]). This leads to the fact that they have been widely studied by several authors; see, for example, Ref. [3,4,5,6,7,8,9,10]. Moreover, the notion of offset has been generalized in different ways, as reflected in [11,12,13]. Dealing with offset curves is easier when the arc-length of the given curve is polynomial. Thus, Pythagorean hodograph (PH) curves, spatial PH curves, rational PH curves and Minkowski PH curves have been thoroughly studied (see [14,15,16] and the bibliography in [13]). Regarding surfaces, Pythagorean normal (PN) surfaces were introduced by Pottmann [17].
It is well known that the offset of a rational curve C or a rational surface S is an algebraic curve or surface, but it is not rational in most cases. In fact, there are numerous articles where conditions for curves and surfaces are studied so that their offsets are rational (see, for example, [18,19,20,21]). In addition, the implicit equation of the offset is typically of much higher degree than the initial curve or surface, has many terms and coefficients of large size and its calculation involves using elimination methods that are not always effective.
However, G. Salmon proved in his classical texts [22,23] that the implicit equation of the offset to non-degenerate conics and to central quadrics can be characterized in terms of the discriminant of a univariate polynomial. We show here that this representation works for the implicit equation of C δ and S δ when C is any conic and S is any quadric. These implicit equations are of determinantal type and free of extraneous components; they provide a very compact expanded form and they are very useful when dealing with geometric queries such as point positioning for offsets or solving intersection purposes involving offsets. This is one of the main motivations for deriving these new representations for the offset implicit equations that can be considered a complement to the new lower-degree rational parametrizations of regular quadric offsets introduced in [18] when manipulating offsets to quadrics. Finally, we should mention that in [24], a determinantal form for the implicit equation for offsets to non-degenerate conics and quadrics was introduced. Here, we refine these formulas, analyze the degenerate cases, provide explicit proofs and include more applications.
This paper is divided into six sections. Following this introduction, the second section introduces the usual formula defining offsets to plane curves and surfaces. In the third one, the implicit equation of the offset to a conic is presented as the determinant of a 4 × 4 or a 3 × 3 matrix, the proof being fully computational. The fourth one introduces the implicit equation of the offset to a quadric as the determinant of a 6 × 6 or a 4 × 4 matrix, the proof being fully computational too. The fifth section shows some geometric queries involving offsets to quadrics where the introduced implicit equations are used. The last section is devoted to the conclusions of the paper.

2. Preliminaries

The next subsections provide some basic notions and the equations describing the offsets to curves and surfaces.

2.1. Conics and Quadrics Representation

Let A be a conic in R 2 . Let X = ( X , Y , 1 ) . It is well known that the implicit equation of A in R 2 can be written as
a ( X , Y ) = a 11 X 2 + a 22 Y 2 + 2 a 12 X Y + 2 a 13 X + 2 a 23 Y + a 33 = 0 ,
or in matricial form A : X A X t = 0 , where A is the symmetric matrix
A = a 11 a 12 a 13 a 12 a 22 a 23 a 13 a 23 a 33 .
Continuing in the same way, let A be a quadric in R 3 and X = ( X , Y , Z , 1 ) . The implicit equation of a quadric A in R 3 can be written as
a ( X , Y , Z ) = a 11 X 2 + a 22 Y 2 + a 33 Z 2 + 2 a 12 X Y + 2 a 13 X Z + 2 a 23 Y Z + 2 a 14 X + 2 a 24 Y + 2 a 34 Z + a 44 = 0 ,
or in matricial form A : X A X t = 0 , where X = ( X , Y , Z , 1 ) and A is the symmetric matrix
A = a 11 a 12 a 13 a 14 a 12 a 22 a 23 a 24 a 13 a 23 a 33 a 34 a 14 a 24 a 34 a 44 .

2.2. Describing the Implicit Equation of an Offset

Given a curve C in R 2 , the δ -offset to C , C δ , is the locus of the points in R 2 , which are at constant Euclidean distance δ from the initial curve C along its normal line. The offset of a curve is generally not rational (even when C is rational) but it is always an algebraic curve. The implicit equation of the δ -offset C δ is usually a very dense polynomial of higher degree than the one of the original curve. If the curve C is presented by its implicit equation f ( x , y ) = 0 , then the computation of the implicit equation of C δ requires the elimination of α and β from these three equations:
f ( α , β ) = 0 , ( x α ) 2 + ( y β ) 2 δ 2 = 0 , ( x α ) f y ( α , β ) ( y β ) f x ( α , β ) = 0 .
Similarly, given a surface S in R 3 , the δ -offset to S , S δ , is the locus of the points in R 3 , which are at constant Euclidean distance δ from the initial surface S (along its normal line). As in the case of curves, S δ is generally not rational. If the surface S is given by its implicit equation f ( x , y , z ) = 0 , then the computation of the implicit equation of S δ requires the elimination of α , β and γ from these four equations:
f ( α , β , γ ) = 0 , ( x α ) f y ( α , β , γ ) ( y β ) f x ( α , β , γ ) = 0 , ( x α ) 2 + ( y β ) 2 + ( z γ ) 2 δ 2 = 0 , ( y β ) f z ( α , β , γ ) ( z γ ) f y ( α , β , γ ) = 0 .
Consequently, the implicit equation of offsets can be obtained using elimination techniques but this can be a time-consuming calculation and, even so, we do not always obtain a closed formula without extraneous factors.

2.3. Discriminant of a Polynomial

Let f ( x ) and g ( x ) be two univariate polynomials with coefficients in a field:
f ( x ) = i = 0 m a i x i , g ( x ) = i = 0 n b i x i .
Then, the Sylvester matrix of f ( x ) and g ( x ) with respect to x, denoted by Syl ( f , g , x ) , is defined as
Syl ( f , g , x ) = a m a 0 a m a 0 b n b 0 b n b 0 n + m n m .
The resultant of f ( x ) and g ( x ) with respect to x, denoted by Res ( f , g , x ) , is the determinant of the Sylvester matrix. It is well known that Res ( f , g , x ) = 0 if and only if f ( x ) and g ( x ) have a common nontrivial factor. Moreover, the discriminant of f ( x ) is defined to be
disc ( f ) = ( 1 ) m ( m 1 ) 2 a m Res ( f , f , x ) ,
and it is widely known that f ( x ) has a multiple root if and only if its discriminant vanishes.

3. On the Implicit Equation for the δ -Offset to a Conic

Given two conics A : X A X t = 0 and B : X B X t = 0 , their characteristic equation is defined as
f ( λ ) = det ( λ B + A ) = det ( B ) λ 3 + + det ( A ) .
From now on, in this section, we will assume that B : X B X t = 0 is a circle with center ( x , y ) , radius δ and
B = 1 0 x 0 1 y x y x 2 + y 2 δ 2 .
In this case, the characteristic polynomial of a conic A and a circle B is a cubic polynomial in λ since det ( B ) = δ 2 0 . More precisely, if
f ( λ ) = det ( λ B + A ) = def δ 2 λ 3 + e 2 ( x , y ) λ 2 + e 1 ( x , y ) λ + det ( A ) ,
we have that
e 2 ( x , y ) = a ( x , y ) δ 2 ( a 11 + a 22 ) , e 1 ( x , y ) = a 11 a 22 a 12 2 x 2 + y 2 δ 2 + 2 a 13 a 22 a 12 a 23 x + 2 a 11 a 23 a 12 a 13 y + a 11 a 33 a 13 2 + a 22 a 33 a 23 2 = = a 11 a 12 a 12 a 22 x 2 + y 2 δ 2 + 2 a 13 a 12 a 23 a 22 x + 2 a 11 a 13 a 12 a 23 y + a 11 a 13 a 13 a 33 + a 22 a 23 a 23 a 33
with deg x , y e i ( x , y ) = 2 .
We say that two conics are touching each other when they intersect in a point with the same tangent line. The following result can be found in [23].
Theorem 1
(see [23]). Given a non-degenerate conic and a circle, they touch each other if and only if their characteristic equation has a multiple root.
Next, we observe that the center ( x , y ) of a circle belongs to the offset to the conic A to distance δ if and only if A is tangent to B . This implies that they touch each other and then, according to the previous theorem, the discriminant of f ( λ ) must vanish. Moreover, the next theorem shows that not only the discriminant must vanish but it is equal to the implicit equation of the offset.
Theorem 2.
Let δ be a positive real number and let A be a non-degenerate conic different from a circle. The implicit equation of A δ , a δ ( x , y ) , agrees with the discriminant (with respect to λ) of the characteristic equation of A and the circle of radius δ and center ( x , y ) .
Proof. 
A point ( x 0 , y 0 ) is on its offset A δ if there exists another point ( X 0 , Y 0 ) with
A ( X 0 , Y 0 ) = B ( X 0 , Y 0 ) = 0 ,
where B equals the circle of radius δ and center ( x 0 , y 0 ) , such that the tangent vectors to A and B at the point ( X 0 , Y 0 ) are proportional. This implies that the Jacobian determinant
D ( X , Y ) = def ( A , B ) ( X , Y )
must vanish at ( X 0 , Y 0 , x 0 , y 0 ) . Thus, one way to obtain the implicit equation of A δ is simply to eliminate the variables ( X , Y ) from the equations
A ( X , Y ) = 0 , B ( X , Y ) = 0 , D ( X , Y ) = 0 .
Assume that our conic A is written in canonical form (see Remark 1). If A = diag ( a 11 , a 22 , a 33 ) , then
D = 2 a 11 X 2 a 22 Y 2 X 2 x 2 Y 2 y = 4 ( ( a 11 a 22 ) X Y a 11 X y + a 22 Y x ) = 4 D ( X , Y ) .
Eliminating ( X , Y ) from A ( X , Y ) = 0 , B ( X , Y ) = 0 , D ( X , Y ) = 0 by performing the next steps,
f 1 = resultant ( D , B , Y ) , f 2 = resultant ( D , A , Y ) , f 3 = resultant ( f 1 , f 2 , X ) ) ,
we obtain
f 3 ( x , y ) = a 11 4 a 22 4 x 4 y 4 ( a 11 a 22 ) 6 discrim ( f ( λ ) ) .
Observe now that if A represents either an ellipse or a hyperbola, then the axes x = 0 and y = 0 do not belong to the offset. Moreover, a 11 4 a 22 4 ( a 11 a 22 ) 6 0 and, therefore, we can conclude that the implicit equation is the discriminant.
If A defines a parabola, x 2 = 2 p y , p 0 , proceeding in the same way, it is found that f 3 ( x , y ) = p 2 x 2 discrim ( f ( λ ) ) and the implicit equation agrees with the discriminant too.   □
Remark 1.
If the conic is not presented in canonical form, then there exists a rigid motion of the plane of matrix P, with P 1 = L , that makes the axes of the transformed conic A ˜ = P ( A ) of matrix A ˜ = L T A L to be x = 0 and y = 0 , with P ( x , y ) = ( x , y ) . Hence, the implicit equation of the δ–offset to A ˜ , as we have seen in the proof of Theorem 2, is the λ-discriminant of f ˜ ( λ , x , y ) = det ( λ B ˜ + L T A L ) , where B ˜ is the matrix of the circle B ˜ of center ( x , y ) and radius δ. On the other hand, a point ( x , y ) lies in the δ-offset of A if and only if P ( x , y ) lies in the δ-offset of A ˜ . Therefore, the implicit equation of the δ-offset of A must be the λ-discriminant of f ˜ ( λ , P ( x , y ) ) . Since the transformed circle B ˜ = P ( B ) , of center P ( x , y ) and radius δ, has matrix L T B L , where B is the matrix of the circle B of center ( x , y ) and radius δ, we have
f ˜ ( λ , P ( x , y ) ) ) = det ( λ L T B L + L T A L ) = det ( L T ( λ B + A ) L ) = det ( L ) 2 f ( λ , x , y ) .
Since L is a rigid motion, the principal 2 × 2 minor is an orthogonal matrix and the last row is ( 0 , 0 , 1 ) , so det ( L ) = ± 1 , so the λ-discriminant of f ( λ , x , y ) and f ˜ ( λ , P ( x , y ) ) agree, so the assumption on the canonical form in the proof of Theorem 2 can be assumed without loss of generality.
The following lemma expresses the discriminant of the characteristic equation of A and the circle of radius δ and center ( x , y ) in a compact way in terms of the polynomials e 1 ( x , y ) and e 2 ( x , y ) presented in (1).
Lemma 1.
Given a conic A and a circle, the discriminant of its characteristic equation is given by
discrim ( f ( λ ) ) = δ 2 0 e 1 ( x , y ) 2 det ( A ) e 2 ( x , y ) 2 e 1 ( x , y ) 3 det ( A ) 0 0 e 2 ( x , y ) 2 e 1 ( x , y ) 3 det ( A ) 0 3 δ 2 2 e 2 ( x , y ) e 1 ( x , y ) .
Proof. 
The discriminant of f ( λ ) is by definition equal to the resultant of f ( λ ) and f ( λ ) divided by δ 2 . If we perform the convenient row operations on the Sylvester matrix of f ( λ ) and f ( λ ) , then we obtain (2).   □
We have the following corollary of Lemma 1 and Theorem 2.
Corollary 1.
Given a non-degenerate conic A , the implicit equation of A δ , a δ ( x , y ) , is given by
a δ ( x , y ) = δ 2 0 e 1 ( x , y ) 2 det ( A ) e 2 ( x , y ) 2 e 1 ( x , y ) 3 det ( A ) 0 0 e 2 ( x , y ) 2 e 1 ( x , y ) 3 det ( A ) 0 3 δ 2 2 e 2 ( x , y ) e 1 ( x , y ) = e 1 ( x , y ) e 2 ( x , y ) 2 + 4 δ 2 e 1 3 ( x , y ) 4 det ( A ) e 2 3 ( x , y ) 18 δ 2 det ( A ) e 1 ( x , y ) e 2 ( x , y ) 27 δ 4 det ( A ) 2 .
The next corollaries show smaller matrices providing the implicit equation of the offset for a non-degenerate conic but with higher-degree entries (and one of them is symmetric). They come from different representations of the resultant in terms of the Bezout matrix (see [25,26]).
Corollary 2.
Given a non-degenerate conic A , the implicit equation of A δ , a δ ( x , y ) , is given by
a δ ( x , y ) = 2 e 1 3 δ 2 det ( A ) + e 1 e 2 2 det ( A ) e 2 e 2 2 δ 2 e 1 3 δ 2 det ( A ) 3 2 e 2 e 1 .
Corollary 3.
Given a non-degenerate conic A , the implicit equation of A δ , a δ ( x , y ) , is given by
a δ ( x , y ) = 3 2 e 2 e 1 2 e 2 2 e 2 2 2 δ 2 e 1 e 1 e 2 3 δ 2 det ( A ) e 1 e 1 e 2 3 δ 2 det ( A ) e 1 2 2 det ( A ) e 2 .

Offsets to Degenerate Conics

The above results require a slight modification when considering degenerate conics. Consider, for example, a ( X , Y ) = Y 2 . In this case, f ( λ ) = δ 2 λ 3 ( δ 2 y 2 ) λ 2 has λ = 0 as a double root and so the discriminant is identically zero. This gives a counterexample for Theorem 1.
On the other hand, applying the determinantal representation (2), when det ( A ) = 0 , it is easy to see that the discriminant factors in the following way:
discrim ( f ( λ ) ) = e 1 2 ( x , y ) e 2 2 ( x , y ) + 4 δ 2 e 1 ( x , y ) ,
and this polynomial is a multiple of the implicit equation of the offset. Our next result shows that this problem is easily solved by dividing f ( λ ) by λ .
Lemma 2.
Given a degenerate conic A and a circle, the discriminant of its characteristic equation divided by λ is equal to
discrim f ( λ ) λ = e 2 2 ( x , y ) + 4 δ 2 e 1 ( x , y ) .
Proof. 
Using the notation of (1),
F ( λ ) = def f ( λ ) λ = δ 2 λ 2 + e 2 ( x , y ) λ + e 1 ( x , y ) .
Using convenient row operations on the Sylvester matrix of F ( λ ) and F ( λ ) , we obtain
discrim ( F ( λ ) ) = e 2 2 e 1 2 δ 2 e 2 = e 2 2 ( x , y ) + 4 δ 2 e 1 ( x , y ) ,
as desired.   □
Thus, we can generalize Theorem 2 to the case when A is degenerate as follows.
Theorem 3.
Let δ be a positive real number and let A be a degenerate conic. Let f ( λ ) denote the characteristic equation of A and the circle of radius δ and center ( x , y ) . Then, the implicit equation of A δ , a δ ( x , y ) , agrees with the discriminant of f ( λ ) / λ .
Proof. 
We will apply the same arguments used in Theorem 2, and assume that our conic A is written in canonical form. Let
F ( λ ) = f ( λ ) λ and D ( X , Y ) = ( A , B ) ( X , Y ) .
If A defines two parallel lines, that is, A = diag ( 0 , a 22 , a 33 ) with a 22 a 33 0 , then D = 4 a 22 Y ( X x ) = 4 D ( X , Y ) . Eliminating ( X , Y ) from A ( X , Y ) = 0 , B ( X , Y ) = 0 , D ( X , Y ) = 0 by performing the following steps:
f 1 = resultant ( D , B , X ) , f 2 = resultant ( D , A , X ) , f 3 = resultant ( f 1 , f 2 , Y ) ) ,
we obtain
f 3 ( x , y ) = a 22 4 a 33 2 discrim ( F ( λ ) ) .
Since a 22 a 33 0 , we can conclude that the implicit equation is the discriminant.
If A defines two intersecting lines, that is, A = diag ( a 11 , a 22 , 0 ) with a 11 a 22 0 , then D = 4 X Y + X y a 11 + X Y x Y a 22 . Following the same steps as above, we have
f 3 ( x , y ) = a 11 6 a 22 6 ( a 11 a 22 ) 6 x 4 y 4 ( δ 2 x 2 y 2 ) 2 discrim ( F ( λ ) ) .
Since A consists of two lines which intersect at the origin, neither the x , y -axes nor the circle of radius δ centered at the origin belong to the offset. Moreover, a 11 a 22 0 and, therefore, the implicit equation is the discriminant.
If A defines a double line, i.e., y 2 = 0 , the discriminant of F ( λ ) is equal to δ 2 y 2 2 , which is obviously the equation of the offset.   □
We can conclude that the offset of a degenerate conic is defined by the equation
e 2 2 ( x , y ) + 4 δ 2 e 1 ( x , y ) = 0 ,
its implicit equation being obtained by simply removing multiple factors.

4. On the Implicit Equation for the δ –Offset to a Quadric

Given two quadrics A : X A X t = 0 and B : X B X t = 0 , their characteristic equation is defined as
f ( λ ) = det ( λ B + A ) = det ( B ) λ 4 + + det ( A ) .
From now on, in this section, we will assume that B : X B X t = 0 is the sphere with center ( x , y , z ) , radius δ and
B = 1 0 0 x 0 1 0 y 0 0 1 z x y z x 2 + y 2 + z 2 δ 2 .
Observe that the characteristic polynomial of a quadric A and a sphere B is a quartic polynomial in λ since det ( B ) = δ 2 0 . If
f ( λ ) = δ 2 λ 4 + e 3 ( x , y , z ) λ 3 + e 2 ( x , y , z ) λ 2 + e 1 ( x , y , z ) λ + det ( A ) ,
then we have
e 3 ( x , y , z ) = a ( x , y , z ) δ 2 ( a 11 + a 22 + a 33 ) , e 2 ( x , y , z ) = ( a 12 2 + a 13 2 + a 23 2 a 11 a 22 a 11 a 33 a 22 a 33 ) δ 2 + ( a 11 a 22 + a 11 a 33 a 12 2 a 13 2 ) x 2 + 2 ( a 11 a 24 + a 24 a 33 a 12 a 14 a 23 a 34 ) y + ( a 11 a 33 + a 22 a 33 a 13 2 a 23 2 ) z 2 + 2 ( a 12 a 33 a 13 a 23 ) x y + 2 ( a 13 a 22 a 12 a 23 ) x z + 2 ( a 11 a 23 a 12 a 13 ) y z + ( a 11 a 22 + a 22 a 33 a 12 2 a 23 2 ) y 2 + 2 ( a 11 a 34 + a 22 a 34 a 13 a 14 a 23 a 24 ) z + 2 ( a 14 a 22 + a 14 a 33 a 12 a 24 a 13 a 34 ) x + a 11 a 44 a 14 2 + a 22 a 44 a 24 2 + a 33 a 44 a 34 2 = a 11 a 12 a 12 a 22 + a 11 a 13 a 13 a 33 x 2 + a 11 a 12 a 12 a 22 + a 22 a 23 a 23 a 33 y 2 + a 11 a 13 a 13 a 33 + a 22 a 23 a 23 a 33 z 2 + 2 a 12 a 13 a 23 a 33 x y 2 a 12 a 13 a 22 a 23 x z + + 2 a 11 a 13 a 14 a 34 + a 22 a 23 a 24 a 34 z + a 11 a 14 a 14 a 44 + a 22 a 24 a 24 a 44 + a 33 a 34 a 34 a 44 a 11 a 12 a 12 a 22 + a 11 a 13 a 13 a 33 + a 22 a 23 a 23 a 33 δ 2 ,
e 1 ( x , y , z ) = ( a 11 a 22 a 33 + 2 a 12 a 13 a 23 a 11 a 23 2 a 12 2 a 33 a 13 2 a 22 ) ( x 2 + y 2 + z 2 δ 2 ) + 2 ( a 12 a 23 a 34 + a 13 a 23 a 24 + a 14 a 22 a 33 a 12 a 24 a 33 a 13 a 22 a 34 a 14 a 23 2 ) x + 2 ( a 11 a 24 a 33 + a 12 a 13 a 34 + a 13 a 14 a 23 a 11 a 23 a 34 a 12 a 14 a 33 a 13 2 a 24 ) y + 2 ( a 11 a 22 a 34 + a 12 a 13 a 24 + a 12 a 14 a 23 a 11 a 23 a 24 a 12 2 a 34 a 13 a 14 a 22 ) z + a 11 a 22 a 44 a 11 a 24 2 + a 11 a 33 a 44 a 11 a 34 2 a 12 2 a 44 a 13 2 a 44 a 14 2 a 22 a 14 2 a 33 + a 22 a 33 a 44 a 22 a 34 2 a 23 2 a 44 a 24 2 a 33 + 2 a 12 a 14 a 24 + 2 a 13 a 14 a 34 + 2 a 23 a 24 a 34 = a 11 a 12 a 13 a 12 a 22 a 23 a 13 a 23 a 33 ( x 2 + y 2 + z 2 δ 2 ) + 2 a 12 a 13 a 14 a 22 a 23 a 24 a 23 a 33 a 34 x 2 a 1 , 1 a 1 , 2 a 1 , 3 a 1 , 3 a 2 , 3 a 3 , 3 a 1 , 4 a 2 , 4 a 3 , 4 y + 2 a 1 , 1 a 1 , 2 a 1 , 4 a 1 , 2 a 2 , 2 a 2 , 4 a 1 , 3 a 2 , 3 a 3 , 4 z + a 2 , 2 a 2 , 3 a 2 , 4 a 2 , 3 a 3 , 3 a 3 , 4 a 2 , 4 a 3 , 4 a 4 , 4 + a 1 , 1 a 1 , 3 a 1 , 4 a 1 , 3 a 3 , 3 a 3 , 4 a 1 , 4 a 3 , 4 a 4 , 4 + a 1 , 1 a 1 , 2 a 1 , 4 a 1 , 2 a 2 , 2 a 2 , 4 a 1 , 4 a 2 , 4 a 4 , 4 ,
with deg x , y , z e i ( x , y , z ) = 2 . Similar to the conics case, the coefficients of e 2 ( x , y , z ) involve the determinants of 2 × 2 submatrices of A and the coefficients of e 1 ( x , y , z ) involve the determinants of 3 × 3 submatrices of A.
We say that two non-degenerate quadrics are touching each other if they have a common nonsingular point with the same tangent plane for both quadrics. The next theorem provides a condition for a quadric and a sphere to touch each other.
Theorem 4
(see [27] for ellipsoids and [22]). Given a non-degenerate quadric and a sphere, they touch each other if and only if their characteristic equation has a root of multiplicity greater than one.
As in the conic case, we observe that the center ( x , y , z ) of a sphere belongs to the offset A δ if and only if A is tangent to B and this fact motivates the next theorem.
Theorem 5.
Let A be a non-degenerate quadric different from a sphere. The implicit equation of A δ , a δ ( x , y , z ) , agrees with the discriminant (with respect to λ) of the characteristic equation of A and the sphere of radius δ and center ( x , y , z ) .
Proof. 
The strategy to follow is similar to the proof of Theorem 2. Reasoning as we did in Remark 1, we can assume that the quadric is written in canonical form. Observe that now the Jacobian matrix is 2 × 3 of rank 1. Therefore, every 2 × 2 determinant provides us an equation that should vanish. Thus, we have a system of equations in X, Y, Z, x, y and z; we then eliminate X, Y and Z, and hence we obtain a resultant H that has as a factor the discriminant of f ( λ ) .
Next, we show this process for the ellipsoid in order to see how this computational proof works.
  • Ellipsoid
Suppose that A is an ellipsoid defined by the diagonal matrix
A = diag 1 a 2 , 1 b 2 , 1 c 2 , 1 = diag α , β , γ , 1 ,
with
α = 1 a 2 , β = 1 b 2 , γ = 1 c 2 , and A : X 2 α + Y 2 β + Z 2 γ = 1 .
In this case,
f ( λ ) = δ 2 λ 4 + e 3 ( x , y , z ) λ 3 + e 2 ( x , y , z ) λ 2 + e 1 ( x , y , z ) λ + det ( A ) ,
with
e 3 = α + β + γ δ 2 + x 2 α + y 2 β + z 2 γ 1 , e 2 = α β + α γ x 2 + α β + β γ y 2 + α γ + β γ z 2 + α β α γ β γ δ 2 γ α β , e 1 = α β γ δ 2 + α β γ x 2 + α β γ y 2 + α β γ z 2 α β α γ β γ .
Every 2 × 2 determinant of the Jacobian matrix provides an equation and, actually, any two of them specify the normal condition (see [28]),
E q 1 = β α X Y + α X y β Y x , E q 2 = γ β Y Z + β Y z γ Z y , E q 3 = γ α X Z + α X z γ Z x .
At this point, we distinguish two different cases:
α β = γ : Here, we eliminate the variables Y and Z from E q 1 = 0 and E q 3 = 0 . Thus,
  • we substitute α X y ( α β ) X + β x for Y and α X z ( α γ ) X + γ x for Z into
    X 2 α + Y 2 β + Z 2 γ = 1 , ( x X ) 2 + ( y Y ) 2 + ( z Z ) 2 δ 2 ,
    and, as a result, we obtain two equations in X, x, y and z. Since the denominators ( α β ) X + β x and ( α γ ) X + γ x are different, we obtain two equations in X, x, y and z of degree 6 in X, whose leading coefficients in X are ( α β ) 2 ( γ α ) 2 and α ( α β ) 2 ( γ α ) 2 , respectively, which never vanish. Once their resultant with respect to X is obtained, denoted by R ( x , y , z ) , we have the following factorization of R ( x , y , z ) into a product of distinct polynomials:
    R ( x , y , z ) = α 16 β 4 γ 4 α γ 6 α β 6 β γ 6 x 16 y 4 z 4 discrim λ ( f ( λ ) ) .
    Obviously, we must exclude the factor α 16 β 4 γ 4 α γ 6 α β 6 β γ 6 x 16 y 4 z 4 from the implicit equation of the offset. Moreover, the origin (0,0,0) is in the offset if δ = b , δ = a or δ = c and, in these three cases, the constant coefficient of discrim ( f ( λ ) ) is equal to
    β δ 2 1 2 α δ 2 1 2 ( γ δ 2 1 ) 2 α β 2 ( γ β ) 2 ( γ α ) 2 ,
    and vanishes. Thus, we conclude that discrim ( f ( λ ) ) defines an implicit equation of the offset.
    α β , α γ , β = γ : Here, we also eliminate the variables Y and Z from E q 1 = 0 and E q 3 = 0 . However, the denominators ( α β ) X + β x and ( α γ ) X + γ x are equal, and so we obtain two equations in X , x , y , z of degree 4 in X by substituting α X y ( α β ) X + β x for Y and α X z ( α γ ) X + γ x for Z into
    X 2 α + Y 2 β + Z 2 γ = 1 , ( x X ) 2 + ( y Y ) 2 + ( z Z ) 2 δ 2 .
    Once their resultant is obtained with respect to X, denoted by R ( x , y , z ) , we have the following factorization of R ( x , y , z ) and discrim ( f ( λ ) ) into a product of distinct irreducible polynomials:
    discrim ( f ( λ ) ) = β 4 ( y 2 + z 2 ) 2 ( α β ) 2 I ( x , y , z ) ,
    R ( x , y , z ) = α 4 β 4 x 4 ( y 2 + z 2 ) 2 ( α β ) 6 I ( x , y , z ) ,
    such that
    α 4 ( α β ) 4 x 4 discrim ( f ( λ ) ) = R ( x , y , z ) .
    By using the same arguments, since the factors α 4 β 4 x 4 ( y 2 + z 2 ) 2 ( α β ) 6 must be excluded from the implicit equation, we can conclude that discrim ( f ( λ ) ) defines an implicit equation of the offset. Observe that the discriminant of f ( λ ) specializes properly when β = γ because the leading coefficient of f ( λ ) never vanishes.
Exactly the same reasoning applies to the other non-degenerate quadrics, i.e., two-sheeted hyperboloid, one-sheeted hyperboloid, elliptic paraboloid, hyperbolic paraboloid, elliptic cylinder, hyperbolic cylinder and parabolic cylinder.   □
As for conics, we have the following lemma describing the discriminant of the characteristic equation of A and the sphere of radius δ and center ( x , y , z ) in a compact way by using the polynomials e 1 ( x , y , z ) , e 2 ( x , y , z ) and e 3 ( x , y , z ) introduced in (3).
Theorem 3
Given a quadric A and a sphere, the discriminant of its characteristic equation is given by
discrim ( f ( λ ) ) = δ 2 0 e 2 2 e 1 3 det ( A ) 0 0 δ 2 0 e 2 2 e 1 3 det ( A ) e 3 2 e 2 3 e 1 4 det ( A ) 0 0 0 e 3 2 e 2 3 e 1 4 det ( A ) 0 0 0 e 3 2 e 2 3 e 1 4 det ( A ) 0 0 4 δ 2 3 e 3 2 e 2 e 1 .
The following corollary is an immediate consequence of the previous results and gives a very compact formula for the implicit equation of the offset to a non-degenerate quadric.
Corollary 4.
Given a non-degenerate quadric A , the implicit equation of A δ , a δ ( x , y , z ) , is given by
a δ ( x , y , z ) = δ 2 0 e 2 2 e 1 3 det ( A ) 0 0 δ 2 0 e 2 2 e 1 3 det ( A ) e 3 2 e 2 3 e 1 4 det ( A ) 0 0 0 e 3 2 e 2 3 e 1 4 det ( A ) 0 0 0 e 3 2 e 2 3 e 1 4 det ( A ) 0 0 4 δ 2 3 e 3 2 e 2 e 1 =
= e 1 e 3 2 e 2 2 4 e 1 e 3 + 2 e 2 9 e 1 e 3 2 e 2 2 det ( A ) e 3 2 δ 2 e 1 2 + 2 δ 2 det ( A ) e 1 e 3 3 e 1 e 3 + 40 e 2 2 27 δ 4 e 1 4 16 δ 2 det ( A ) e 2 4 27 det ( A ) 2 e 3 4 + 144 δ 2 det ( A ) e 2 δ 2 e 1 2 det ( A ) e 3 2 64 δ 4 det ( A ) 2 3 e 1 e 3 + 2 e 2 2 256 δ 6 det ( A ) 3 .
The next corollaries show smaller matrices providing the implicit equation of the offset for a non-degenerate quadric but with higher-degree entries (and one of them is symmetric). They come from different representations of the resultant in terms of the Bezout matrix.
Corollary 5.
Given a non-degenerate quadric A , the implicit equation of A δ , a δ ( x , y , z ) , is given by
a δ ( x , y , z ) = 3 e 1 4 δ 2 det ( A ) + 2 e 1 e 3 3 det ( A ) e 3 + e 1 e 2 2 det ( A ) e 2 2 e 2 3 δ 2 e 1 + e 2 e 3 4 δ 2 det ( A ) + 2 e 1 e 3 3 det ( A ) e 3 e 3 2 δ 2 e 2 3 δ 2 e 1 4 δ 2 det ( A ) 4 3 e 3 2 e 2 e 1 .
Corollary 6.
Given a non-degenerate quadric A , the implicit equation of A δ , a δ ( x , y , z ) , is given by a δ ( x , y , z ) , defined as the determinant
4 3 e 3 2 e 2 e 1 3 e 3 3 e 3 2 2 e 2 δ 2 2 e 2 e 3 3 e 1 δ 2 e 1 e 3 4 δ 2 det ( A ) 2 e 2 2 e 2 e 3 3 e 1 δ 2 2 e 2 2 4 δ 2 det ( A ) 2 e 1 e 3 e 1 e 2 3 det ( A ) e 3 e 1 e 1 e 3 4 δ 2 det ( A ) e 1 e 2 3 det ( A ) e 3 e 1 2 2 det ( A ) e 2 .
Remark 2.
When A and B are both spheres, the characteristic polynomial f ( λ ) has always a root of multiplicity two, λ = 1 , because two spheres always have a double contact at infinity (see Art. 202 in [22]). Then, its discriminant is equal to zero. However, if we eliminate the factor ( λ + 1 ) 2 from f ( λ ) , we have the same result as in Theorem 5. More precisely, assuming that A is a sphere of radius R given in canonical form, we have f ( λ ) = ( λ + 1 ) 2 ( δ 2 λ 2 + ( R 2 + δ 2 x 2 y 2 z 2 ) λ + R 2 ) and the discriminant of δ 2 λ 2 + ( R 2 + δ 2 x 2 y 2 z 2 ) λ + R 2 factors into the two spheres that define the offset of A , ( ( R + δ ) 2 x 2 y 2 z 2 ) ( ( R δ ) 2 x 2 y 2 z 2 ) . The case of two circles is similar: we eliminate the factor λ + 1 in f ( λ ) in order to get the desired result.
Remark 3.
G. Salmon proved in his classical texts [22,23] that the offset to non-degenerate conics and to central quadrics can be characterized in terms of the discriminant of a univariate polynomial. Moreover, he introduces a way to “express the coordinates of the parallel surface by means of two parameters” by using either the roots of the aforementioned discriminant (a double root and two simple roots with a dependence among them) or the length of the axes of the two confocal quadrics through a point. However, to the best of the authors’ knowledge, for any general point in the offset (or its foot in the ellipsoid), the situation is equal to the case of its symmetric points in the other eight octants defined by the axes of the ellipsoid, both regarding the roots and regarding the confocal quadrics (which share axes with the ellipsoid). This makes such parametrization a radical one of order eight. We are, however, more interested in rational parametrizations for the offsets or in their implicit equations when the others are difficult to compute or to use (see Section 5.4).

Offsets to Degenerate Quadrics

As expected, the above results are not totally correct for degenerate quadrics: det ( A ) = 0 . In this case, the discriminant of f ( λ ) factors into
discrim ( f ( λ ) ) = e 1 2 e 3 2 4 e 1 e 3 e 2 2 + 2 δ 2 e 2 9 e 1 e 3 2 e 2 2 + 27 δ 4 e 1 2 ,
and it is a multiple of the implicit equation. However, depending on the quadric, we will need either the discriminant of f ( λ ) / λ or of f ( λ ) / λ 2 . Using the notation in (3), we have the next formula.
Lemma 4.
Given a degenerate quadric A and a sphere, the discriminant of its characteristic equation divided by λ is equal to
discrim f ( λ ) λ = e 3 2 4 e 1 e 3 e 2 2 + 2 δ 2 e 2 9 e 1 e 3 2 e 2 2 + 27 δ 4 e 1 2 .
If, moreover, e 1 = 0 (i.e., when rank ( A ) 2 ) then
discrim f ( λ ) λ 2 = 4 δ 2 e 2 + e 3 2 .
Next, we will see what happens with two degenerate quadrics: a real cone and two real intersecting planes. The first one requires the discriminant of f ( λ ) / λ , whereas the second requires that of f ( λ ) / λ 2 .
  • Real cone
Suppose that A is a real cone defined by the diagonal matrix
A = diag 1 a 2 , 1 b 2 , 1 c 2 , 0 = diag α , β , γ , 0 ,
with
α = 1 a 2 , β = 1 b 2 , γ = 1 c 2 and A : X 2 α + Y 2 β Z 2 γ = 0 .
Then
f ( λ ) = δ 2 λ 4 + e 3 ( x , y , z ) λ 3 + e 2 ( x , y , z ) λ 2 + e 1 ( x , y , z ) λ ,
with
e 3 = γ α β δ 2 + α x 2 + β y 2 γ z 2 , e 2 = α β + α γ + β γ δ 2 + ( α β α γ ) x 2 + ( α β β γ ) y 2 ( α γ + β γ ) z 2 , e 1 = γ α β ( δ 2 x 2 y 2 z 2 ) .
As before, every 2 × 2 determinant of the Jacobian matrix provides an equation,
E q 1 = β α X Y + α X y β Y x , E q 2 = γ β Y Z + β Y z + γ Z y , E q 3 = γ α X Z + α X z + γ Z x ,
and we eliminate the variables Y , X from E q 2 = 0 and E q 3 = 0 . Thus, we substitute Z γ y ( β + γ ) Z β z for Y and Z γ x ( α + γ ) Z α z for X into
X 2 α + Y 2 β Z 2 γ = 0 , ( x X ) 2 + ( y Y ) 2 + ( z Z ) 2 δ 2 = 0 ,
and, as a result, we obtain two equations in Z , x , y , z . From here, following the same reasoning as in the ellipsoid case, we conclude that the discriminant of f ( λ ) / λ is a factor of the resultant and defines the implicit equation for the considered offset.
  • Two real intersecting planes
Suppose that A is a quadric defined by the diagonal matrix
A = diag 1 a 2 , 1 b 2 , 0 , 0 = diag α , β , 0 , 0 ,
with
α = 1 a 2 , β = 1 b 2 , and A : X 2 α Y 2 β = 0 .
Then
f ( λ ) = δ 2 λ 4 + α x 2 β y 2 + ( β α ) δ 2 λ 3 + α β δ 2 x 2 y 2 λ 2 , F ( λ ) = δ 2 λ 2 + α x 2 β y 2 + ( β α ) δ 2 λ + α β δ 2 x 2 y 2 .
As before, every 2 × 2 determinant of the Jacobian matrix provides an equation,
E q 1 = α β X Y + α X y + β Y x , E q 2 = Y Z β Y β z , E q 3 = X Z α + X α z ,
and we eliminate the variables Y , Z from E q 1 = 0 and E q 3 = 0 .
Thus, we substitute α X y ( α + β ) X β x for Y and z for Z into the equations
X 2 α Y 2 β = 0 , ( x X ) 2 + ( y Y ) 2 + ( z Z ) 2 δ 2 = 0 ,
and, as a result, we obtain two equations in X , x , y , z . Once their resultant is obtained with respect to X, denoted by R ( x , y , z ) , we have the following factorization for R ( x , y , z ) :
α 6 β 6 ( α + β ) 6 x 4 y 4 ( δ 2 x 2 y 2 ) 2 discrim λ ( F ( λ ) ) = R ( x , y , z ) .
Neither the cylinder δ 2 x 2 y 2 = 0 nor the x-axis or the y-axis belong to the offset, so we can conclude that discrim λ ( F ( λ ) ) defines an implicit equation of the offset. In fact, the following factorization of the discriminant in terms of a and b (up to a constant) provides the four planes defining the offset:
δ a 2 + b 2 a y b x δ a 2 + b 2 + a y + b x δ a 2 + b 2 a y + b x δ a 2 + b 2 + a y b x .
In order to treat other degenerate quadrics, the discriminant of f ( λ ) / λ 2 must be considered for double planes and the discriminant of f ( λ ) / λ for elliptic, hyperbolic and parabolic cylinders.

5. Answering Geometric Queries Involving Offsets to Conics and Quadrics

In this section, we present several examples of how the different representations of the implicit equation of the offset to a conic or a quadric can be used to deal with two different geometric queries about these offsets: point positioning and several intersection instances.
The first and immediate application of the presented formulae is to decide when a given point belongs to the offset to distance δ of a conic or a quadric. To answer this question, we can use the different determinantal representations presented so far but we want to quote here the explicit and compact formulae introduced in Corollary 1, Corollary 4 and Lemma 4:
  • the point P is in the δ –offset to the non-degenerate conic defined by A if
    e 1 2 ( P ) e 2 2 ( P ) + 4 δ 2 e 1 3 ( P ) 4 det ( A ) e 2 3 ( P ) 18 δ 2 det ( A ) e 1 ( P ) e 2 ( P ) 27 δ 4 det ( A ) 2 = 0 .
  • the point P is in the δ –offset to the non-degenerate quadric defined by A if
    e 1 2 ( P ) e 3 2 ( P ) e 2 2 ( P ) 4 e 1 ( P ) e 3 ( P ) 27 δ 4 e 1 4 ( P ) 16 δ 2 det ( A ) e 2 4 ( P ) + 2 e 2 ( P ) 9 e 1 ( P ) e 3 ( P ) 2 e 2 2 ( P ) det ( A ) e 3 2 ( P ) δ 2 e 1 2 ( P ) + 2 δ 2 det ( A ) e 1 ( P ) e 3 ( P ) 3 e 1 ( P ) e 3 ( P ) + 40 e 2 2 ( P ) 27 det ( A ) 2 e 3 4 ( P ) + 144 δ 2 det ( A ) e 2 ( P ) δ 2 e 1 2 ( P ) det ( A ) e 3 2 ( P ) 64 δ 4 det ( A ) 2 3 e 1 ( P ) e 3 ( P ) + 2 e 2 2 ( P ) 256 δ 6 det ( A ) 3 = 0 .
  • the point P is in the δ –offset to the cone or the cylinder defined by A if
    e 3 2 ( P ) 4 e 1 ( P ) e 3 ( P ) e 2 2 ( P ) + 2 δ 2 e 2 ( P ) 9 e 1 ( P ) e 3 ( P ) 2 e 2 2 ( P ) + 27 δ 4 e 1 2 ( P ) = 0 .
These implicit equations are presented in such a way that they are very useful for evaluation purposes:
  • Checking if P is in the δ –offset to the non-degenerate conic defined by A requires us to evaluate e 1 ( P ) , e 2 ( P ) , e 1 ( P ) e 2 ( P ) , e 1 3 ( P ) and e 2 3 ( P ) .
  • Checking if P is in the δ –offset to the non-degenerate quadric defined by A requires us to evaluate e 1 ( P ) , e 2 ( P ) , e 3 ( P ) , e 1 ( P ) e 3 ( P ) , e 1 2 ( P ) , e 2 2 ( P ) , e 3 2 ( P ) , e 1 4 ( P ) , e 2 4 ( P ) and e 3 4 ( P ) .
  • Checking if P is in the δ –offset to the cone or the cylinder defined by A requires us to evaluate e 1 ( P ) , e 2 ( P ) , e 3 ( P ) , e 1 ( P ) e 3 ( P ) , e 1 2 ( P ) , e 2 2 ( P ) and e 3 2 ( P ) .
Apart from solving the point positioning problem, implicit equations appear to be useful when dealing with intersection problems if the size and structure of such implicit equations are good enough. For example, to compute the intersection of the offset of a quadric with a surface parameterized by S ( s , t ) = ( x ( s , t ) , y ( s , t ) , z ( s , t ) ) , one can replace each coordinate in the e i ( x , y , z ) in Corollary 4 by its corresponding parametric expression so that the intersection equation is given by
δ 2 0 e 2 ( s , t ) 2 e 1 ( s , t ) 3 det ( A ) 0 0 δ 2 0 e 2 ( s , t ) 2 e 1 ( s , t ) 3 det ( A ) e 3 ( s , t ) 2 e 2 ( s , t ) 3 e 1 ( s , t ) 4 det ( A ) 0 0 0 e 3 ( s , t ) 2 e 2 ( s , t ) 3 e 1 ( s , t ) 4 det ( A ) 0 0 0 e 3 ( s , t ) 2 e 2 ( s , t ) 3 e 1 ( s , t ) 4 det ( A ) 0 0 4 δ 2 3 e 3 ( s , t ) 2 e 2 ( s , t ) e 1 ( s , t ) = 0
with deg x , y , z e i ( x , y , z ) = 2 . Several examples of this situation are presented in what follows:
  • In Section 5.1, we compute the plane section of the offset of an ellipsoid.
  • In Section 5.2, we compute the intersection curve between a parabolic cylinder and the offset of a one-sheet hyperboloid.
  • In Section 5.3, we show the ray tracing of the offset to an ellipsoid.
  • In Section 5.4, we introduce some of the difficulties that may arise when using a rational parametrization of the offset (if available) to deal with intersection queries.
  • Finally, in Section 5.5, we show how to compute the intersection between a spatial curve rationally parametrized and the offset to an ellipsoid.
All these examples have been analyzed by using Maple 2018 and, in some of them, we tried to use additionally standard elimination procedures, such as Gröbner bases, without success due to the huge size of the involved equations.

5.1. Sectioning the Offset to an Ellipsoid

Let A be the ellipsoid given by the equation
117 x 2 + 16 y 2 + 63 z 2 + 351 81 3 x 16 y 81 3 189 z + 54 3 x z + 265 + 243 3 2 = 0 ,
and we compute the section of its offset A 4 / 5 by the plane parameterized by
( x ( s , t ) , y ( s , t ) , z ( s , t ) ) = ( s , t , ( 1 / 2 ) s + 2 t + 2 ) .
The determinant in Equation (4) produces the implicit equation of the section in the ( s , t ) -parameter space. We can choose 80 equally spaced values of s and find the corresponding values of t by using the implicit equation of the offset. There are two ways to determine these values:
  • Find the zeros of the determinant by solving a generalized eigenvalue problem and choosing the real solutions.
  • Expand the determinant and find the roots using Maple command fsolve.
Next, we follow the same steps, exchanging the roles of s and t. In both cases, for each pair ( s , t ) , we find the corresponding point on the sectioning plane.
With the generalized eigenvalue method, a total of 442 points in the intersection curve are obtained in 1.313 s. Using fsolve, 440 points are produced in 0.828 s. Although the second method is faster, some solutions may be missed with fsolve, and one may need to increase the precision digits.
Figure 1 shows the interior and exterior offsets with points in the sectioning in red.

5.2. Intersecting the Offset of a Hyperboloid with a Surface

We consider the intersection of the offset of the one-sheet hyperboloid with implicit equation 9 x 2 + 4 y 2 9 z 2 = 36 and the parabolic cylinder parameterized by ( u v + 1 , u + v , 2 u 2 ) . We introduce this parametrization in the determinant in Equation (4) to obtain the determinantal form of the implicit equation of the curve in the ( u , v ) -plane that represents the intersection curve of the two considered surfaces.
As in the previous example, one may choose not to expand the determinant and use the generalized eigenvalue approach, or to expand the determinant to obtain a bivariate polynomial equation of degree 24 in u and degree 12 in v. In any case, 654 points in the intersection curve were generated in 1.798 s when using generalized eigenvalues and 0.953 s when using the Maple command fsolve.
Figure 2a shows the curve in the parameter space and Figure 2b the interior and exterior offsets of the hyperboloid, the parabolic cylinder and the red points those belonging to the intersection.

5.3. Intersecting the Offset to a Quadric with a Cone (Ray-Tracing)

Next, we intersect the offset A 3 / 5 with the cone with vertex at ( 4 , 3 , 3 ) and passing through the circle x 2 + y 2 2 x 4 y = 3 , z = 4 . We generate 150 rays into the considered cone, each one to be intersected with A 3 / 5 . Three possibilities arise here:
  • developing the determinant defining a 3 / 5 ( x , y , z ) , replacing ( x , y , z ) by each ray equation and solving the obtained equation,
  • replacing ( x , y , z ) by each ray equation in the matrix defining a δ ( x , y , z ) , developing its determinant and solving the obtained equation, and
  • replacing ( x , y , z ) by each ray equation in the matrix defining a 3 / 5 ( x , y , z ) , moving the 6 × 6 determinant giving a 3 / 5 ( x ( t ) , y ( t ) , z ( t ) ) to a generalized eigenvalue problem (two 12 × 12 matrices) and computing the associated real generalized eigenvalues.
Finally, we obtain 260 points. The first two options require an increase in the Maple precision from Digits : = 10 to Digits : = 20 in order to achieve the correct results. The first option took 13 s, the second option 2 s and the third option 1.6 s, showing that, even for moderate size problems (for the matrices involved), computing generalized eigenvalues is usually the best strategy in terms of accuracy and efficiency.
Figure 3 shows in two pictures the intersection of the 150 rays with the two components of A 3 / 5 (left: exterior, right: interior).

5.4. Trying to Use the Parametrization of the Offset in Geometric Queries

An alternative approach to deal with the intersection of the offset A δ of a quadric and another surface S could be to use the implicit equation of S and a parametrization of A δ . However, it is not easy, in general, to obtain a suitable parametrization of the offset for this kind of intersection problem.
For example, Krasauskas and Zube in [18] find a rational parametrization for the δ -offset of an elliptic paraboloid P , assuming that it is not of revolution. This parametrization is of the form p δ ( s , t ) = p ( s , t ) + δ n ( s , t ) , where n ( s , t ) is a rational Gauss map of P , and p ( s , t ) is a PN-parametrization of P obtained from n ( s , t ) ; p δ ( s , t ) has bidegree ( 4 , 6 ) . To obtain the parametrization, they start from a standard rational parametrization of the unit sphere and apply a suitable hyperbolic rotation. Thus, there are two umbilic points, p = p ( s , 1 ) and p + = p ( s , 1 ) , for any s R , such that all the curves s = c o n s t pass through them.
The three components ( p 1 , p 2 , p 3 ) have a factor t in the denominator, whence the domain of the parametrization must be contained in { ( s , t ) : t 0 } . It must be taken into account that the orientation of n ( s , t ) depends on the sign of t. Even if the values t = ± 1 are avoided, there is not a single domain for p that produces a single patch parameterizing the whole elliptic paraboloid, such that p is one-to-one. Therefore, for solving the intersection problem, one must carefully choose the domains that cover the required regions of P with a one-to-one mapping.

5.5. Intersecting the Offset to a Quadric with a Curve

Similar to the intersection with a surface, to compute the intersection of the offset of a quadric with a parameterized curve, one may replace each coordinate in the e i ( x , y , z ) in Corollary 4 with the corresponding one in the parametrization of the curve. The roots of the determinant so obtained are the parameter values that define the intersection points.
For example, consider the same ellipsoid as in Section 5.1 and the curve C given by the parameterization ( x ( t ) , y ( t ) , z ( t ) ) = ( t 2 + 13 / 20 , t / 3 , t 4 2 ) . The problem to solve is to determine the intersection points of C and A 4 / 5 . Again, there are two ways to approach this problem:
  • Determining the degree 48 polynomial a δ ( x ( t ) , y ( t ) , z ( t ) ) by developing the determinant defining a δ ( x , y , z ) and computing its real roots (six).
  • Moving the 6 × 6 determinant providing a δ ( x ( t ) , y ( t ) , z ( t ) ) to a generalized eigenvalue problem (two 48 × 48 matrices) and computing its real generalized eigenvalues (six, too).
Figure 4 shows, from two different points of view, the six intersection points together with the initial ellipsoid and its interior and exterior offsets: two intersection points with the interior offset and four with the exterior one (for deciding to which offset belongs each intersection point is enough to check if it is inside or outside the considered ellipsoid).
Remark 4.
The determinantal expressions derived for the offset to conics and quadrics show very good behavior when solving intersection queries through a generalized eigenvalue problem: they eliminate infinite eigenvalues and the pencil of matrices derived from these determinants is very sparse. The shape of the two matrices in the previous examples is reflected in Figure 5.
For the previous example, computing the huge polynomial a δ ( x ( t ) , y ( t ) , z ( t ) ) takes 0.562 s and determining its real roots 0.579 s, while the pencil of matrices is determined in 0.063 s and computing its generalized eigenvalues requires 0.07 s.

6. Conclusions

Starting from the implicit equations of conics and quadrics, we have introduced a new way to obtain the implicit equation of their corresponding offsets, highly efficient to solve geometric problems such as point positioning or for solving intersection problems. This new method consists of describing the offset directly as the discriminant of a characteristic equation. This new description, on the one hand, avoids the use of complex elimination techniques and, on the other, allows the use of typical tools for numerical matrix analysis, such as the generalized eigenvalues.

Author Contributions

J.C., G.M.D.-T., M.F. and L.G.-V. have participated in all the stages of this work. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Spanish Ministerio de Economía y Competitividad and by the European Regional Development Fund (ERDF), under the project MTM2017-88796-P.

Acknowledgments

The authors wish to thank the anonymous referees for their remarks which allowed to substantially improve the presentation of this paper. Jorge Caravantes is a member of the Research Group ASYNACS (Ref.CT-CE2019/683).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Farouki, R.T.; Srinathu, J. A real-time CNC interpolator algorithm for trimming and filling planar offset curves. Comput. Aided Des. 2017, 86, 1–11. [Google Scholar] [CrossRef] [Green Version]
  2. Maekawa, T. An overview to offset curves and surfaces. Comput. Aided Des. 1999, 31, 165–173. [Google Scholar] [CrossRef]
  3. Farouki, R.T.; Neff, C.A. Analytic properties of plane offset curves. Comput. Aided Geom. Des. 1990, 7, 83–99. [Google Scholar] [CrossRef]
  4. Pham, B. Offset curves and surfaces: A brief survey. Comput. Aided Des. 1992, 24, 223–229. [Google Scholar] [CrossRef]
  5. Segundo, F.S.; Sendra, J.R. Degree formulae for offset curves. J. Pure Appl. Algebra 2005, 195, 301–335. [Google Scholar] [CrossRef] [Green Version]
  6. Segundo, F.S.; Sendra, J.R. Partial degree formulae for plane offset curves. J. Symb. Comput. 2009, 44, 635–654. [Google Scholar] [CrossRef] [Green Version]
  7. Sendra, J.R.; Sendra, J. Algebraic analysis of offsets to hypersurfaces. Math. Z. 2000, 234, 697–719. [Google Scholar] [CrossRef]
  8. Alcazar, J.G.; Caravantes, J.; Diaz-Toca, G.M. On the square-freeness of the offset equation to a rational planar curve. Int. J. Algebra Comput. 2018, 28, 395–409. [Google Scholar] [CrossRef]
  9. Farouki, R.T.; Neff, C.A. Algebraic properties of plane offset curves. Comput. Aided Geom. Des. 1990, 7, 101–127. [Google Scholar] [CrossRef]
  10. Vršek, J.; Lávička, M. Reducibility of offsets to algebraic curves. Comput. Aided Geom. Des. 2013, 30, 140–147. [Google Scholar] [CrossRef]
  11. Elber, G.; Kim, M.-S. Euclidean offset and bisector approximations of curves over freeform surfaces. Comput. Aided Geom. Des. 2020, 80, 101850. [Google Scholar] [CrossRef]
  12. Sendra, J.R.; Sendra, J. Rationality Analysis and Direct Parametrization of Generalized Offsets to Quadrics. AAECC 2000, 11, 111–139. [Google Scholar] [CrossRef]
  13. Vršek, J.; Lávička, M. Exploring hypersurfaces with offset–like convolutions. Comput. Aided Geom. Des. 2012, 29, 676–690. [Google Scholar] [CrossRef]
  14. Farouki, R.T. Pythagorean-Hodograph Curves. In Handbook of Computer Aided Geometric Design; Hoschek, J., Farin, G., Kim, M.-S., Eds.; North-Holland: Amsterdam, The Netherlands, 2002; pp. 405–427. [Google Scholar]
  15. Kosinka, J.; Jüttler, B. G1 Hermite interpolation by Minkowski Pythagorean hodograph cubics. Comput. Aided Geom. Des. 2006, 23, 401–418. [Google Scholar] [CrossRef]
  16. Peternell, M.; Pottmann, H. A Laguerre geometric approach to rational offsets. Comput. Aided Geom. Des. 1998, 15, 223–249. [Google Scholar] [CrossRef]
  17. Pottmann, H. Rational curves and surfaces with rational offsets. Comput. Aided Geom. Des. 1995, 12, 175–192. [Google Scholar] [CrossRef]
  18. Krasauskas, R.; Zube, S. Rational offsets of regular quadrics revisited. Comput. Aided Geom. Des. 2018, 64, 1–10. [Google Scholar] [CrossRef]
  19. Lü, W. Rationality of the offsets to algebraic curves and surfaces. Appl. Math. JCU 1994, 9, 265–278. [Google Scholar]
  20. Farouki, R.T.; Sakkalis, T. Pythagorean hodographs. IBM J. Res. Dev. 1990, 34, 736–752. [Google Scholar] [CrossRef]
  21. Lü, W. Rational parameterization of quadrics and their offsets. Computing 1996, 57, 135–147. [Google Scholar] [CrossRef]
  22. Salmon, G. A Treatise on the Analytic Geometry of Three Dimensions, 5th ed.; Longmans, Green and Co.: London, UK, 1912. [Google Scholar]
  23. Salmon, G. A Treatise on Conic Sections, 6th ed.; Longmans, Green and Co.: London, UK, 1879. [Google Scholar]
  24. Caravantes, J.; Fioravanti, M.; Gonzalez-Vega, L.; Diaz-Toca, G. Offsets to Conics and Quadrics: A New Determinantal Representation for Their Implicit Equation. ACM Commun. Comput. Algebra 2018, 52, 85–88. [Google Scholar] [CrossRef]
  25. Helmke, U.; Fuhrmann, P.A. Bezoutians. Linear Algebra Appl. 1989, 122–124, 1039–1097. [Google Scholar] [CrossRef] [Green Version]
  26. Lancaster, P.; Tismenetsky, M. The theory of matrices. In Computer Science and Applied Mathematics; Academic Press: San Diego, CA, USA, 1985. [Google Scholar]
  27. Wang, W.; Wang, J.; Kim, M.-S. An algebraic condition for the separation of two ellipsoids. Comput. Aided Geom. Des. 2001, 18, 531–539. [Google Scholar] [CrossRef]
  28. Hoffmann, C.M. Algebraic and Numerical Techniques for Offsets and Blends. In Computation of Curves and Surfaces; Dahmen, W., Gasca, M., Micchelli, C.A., Eds.; NATO ASI Series 307; Springer: Dordrecht, The Netherlands, 1990. [Google Scholar]
Figure 1. The section of an offset by a plane.
Figure 1. The section of an offset by a plane.
Mathematics 09 01784 g001
Figure 2. (a) Intersection curve. (b) Intersection of the offset with the cylinder.
Figure 2. (a) Intersection curve. (b) Intersection of the offset with the cylinder.
Mathematics 09 01784 g002
Figure 3. Ray tracing.
Figure 3. Ray tracing.
Mathematics 09 01784 g003
Figure 4. Intersection of an offset with a curve.
Figure 4. Intersection of an offset with a curve.
Mathematics 09 01784 g004
Figure 5. Shape of pencil of matrices.
Figure 5. Shape of pencil of matrices.
Mathematics 09 01784 g005
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Caravantes, J.; Diaz-Toca, G.M.; Fioravanti, M.; Gonzalez-Vega, L. On the Implicit Equation of Conics and Quadrics Offsets. Mathematics 2021, 9, 1784. https://doi.org/10.3390/math9151784

AMA Style

Caravantes J, Diaz-Toca GM, Fioravanti M, Gonzalez-Vega L. On the Implicit Equation of Conics and Quadrics Offsets. Mathematics. 2021; 9(15):1784. https://doi.org/10.3390/math9151784

Chicago/Turabian Style

Caravantes, Jorge, Gema M. Diaz-Toca, Mario Fioravanti, and Laureano Gonzalez-Vega. 2021. "On the Implicit Equation of Conics and Quadrics Offsets" Mathematics 9, no. 15: 1784. https://doi.org/10.3390/math9151784

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop