Symmetry Detection of Rational Space Curvesfrom their Curvature and Torsion

# Symmetry Detection of Rational Space Curves from their Curvature and Torsion

## Abstract

We present a novel, deterministic, and efficient method to detect whether a given rational space curve is symmetric. By using well-known differential invariants of space curves, namely the curvature and torsion, the method is significantly faster, simpler, and more general than an earlier method addressing a similar problem AHM13-2 (). To support this claim, we present an analysis of the arithmetic complexity of the algorithm and timings from an implementation in Sage.

## 1 Introduction

The problem of detecting the symmetries of curves and surfaces has attracted the attention of many researchers throughout the years, because of the interest from fields like Pattern Recognition Boutin (); Calabi (); Huang (); LR08 (); LRTh (); Suk1 (); Suk2 (); TC00 (); Taubin2 (); Weiss (), Computer Graphics Berner08 (); Bokeloh (); Lipman (); Martinet (); Mitra06 (); Podolak (); Schnabel (); Simari (), and Computer Vision Alt88 (); Brass (); Jiang (); Li08 (); Li10 (); Loy (); Tate (); Sun (). The introduction in AHM13-2 () contains an extensive account of the variety of approaches used in the above references.

A common characteristic in most of these papers is that the methods focus on computing approximate symmetries more than exact symmetries, which is perfectly reasonable in many applications, where curves and surfaces often serve as merely approximate representations of a more complex shape. Some exceptions appear here: If the object to be considered is discrete (e.g. a polyhedron), or is described by a discrete object, like for instance a control polygon or a control polyhedron, then the symmetries can be determined exactly Alt88 (); Brass (); Jiang (); Li08 (). Examples of the second class are Bézier curves and tensor product surfaces. Furthermore, in these cases the symmetries of the curve or surface follow from those of the underlying discrete object. Another exception appears in LR08 (), where the authors provide a deterministic method to detect rotation symmetry of an implicitly defined algebraic plane curve and to find the exact rotation angle and rotation center. The method uses a complex representation of the curve and is generalized in LRTh () to detect mirror symmetry as well.

Rational curves are frequently used in Computer Aided Geometric Design and are the building blocks of NURBS curves. Compared to implicit curves, rational parametric curves are easier to manipulate and visualize. Space curves appear in a natural way when intersecting two surfaces, and they play an important role when dealing with special types of surfaces, often used in geometric modeling, like ruled surfaces, canal surfaces or surfaces of revolution, which are generated from a directrix or profile curve. Furthermore, in geometric modeling it is typical to use rational space curves as profile curves.

In this paper we address the problem of deterministically finding the symmetries of a rational space curve, defined by means of a proper parametrization. Notice that since we deal with a global object, i.e., the set of all points in the image of a rational parametrization, and not just a piece of it, the discrete approach from Alt88 (); Brass (); Jiang (); Li08 () is not suitable here. Determining if a rational space curve is symmetric or not is useful in order to properly describe the topology of the curve AD10 (). Furthermore, if the space curve is to be used for generating, for instance, a canal surface or a surface of revolution, certain symmetries of the curve will be inherited by the generated surface. Hence, for modeling purposes it can be interesting to know these symmetries in advance.

Recently, the problem of determining whether a rational plane or space curve is symmetric has been addressed in A13 (); AHM13 (); AHM13-2 () using a different approach. The common denominator in these papers is the following observation: If a rational curve is symmetric, i.e., invariant under a nontrivial isometry , then this symmetry induces another parametrization of the curve, different from the original parametrization. Assuming that the initial parametrization is proper (definition below), the second parametrization is also proper. Since two proper parametrizations of the same curve are related by a Möbius transformation SWPD (), determining the symmetries is reduced to finding this transformation, therefore translating the problem to the parameter space. This observation leads to algorithms for determining the symmetries of plane curves with polynomial parametrizations A13 () and of plane and space curves with rational parametrizations AHM13-2 (), although in the latter case of general space curves only involutions were considered. The more general problem of determining whether two rational plane curves are similar was considered in AHM13 ().

In this paper we again employ the above observation, but in addition we now also use well-known differential invariants of space curves, namely the curvature and the torsion. The improvement over the method in AHM13-2 () is threefold: First of all, we are now able to find all the symmetries of the curve instead of just the involutions. Secondly, the new algorithm is considerably faster and can efficiently handle even curves with high degrees and large coefficients in reasonable timings. Finally, the method is simpler to implement and requires fewer assumptions on the parametrization.

Some general facts on symmetries of rational curves are presented in Section 2. Section 3 provides an algorithm for checking whether a curve is symmetric. The determination of the symmetries themselves is addressed in Section 4. Finally, in Section 5 we report on the performance of the algorithm, by presenting a complexity analysis and providing timings for several examples, including a comparison with the curves tested in AHM13-2 ().

## 2 Symmetries of rational curves

Throughout the paper, we consider a rational space curve , neither a line nor a circle, parametrized by a rational map

 x:R⇢C⊂R3,x(t)=(x(t),y(t),z(t)). (1)

The components of are rational functions of with rational coefficients, and they are defined for all but a finite number of values of . Let the (parametric) degree of be the maximal degree of the numerators and denominators of the components . Note that rational curves are irreducible. We assume that the parametrization (1) is proper, i.e., birational or, equivalently, injective except for perhaps finitely many values of . This can be assumed without loss of generality, since any rational curve can quickly be properly reparametrized. For these claims and other results on properness, the interested reader can consult SWPD () for plane curves and (A12, , §3.1) for space curves.

We recall some facts from Euclidean geometry Coxeter (). An isometry of is a map preserving Euclidean distances. Any isometry of is linear affine, taking the form

 f(x)=Qx+b,x∈R3, (2)

with and an orthogonal matrix. In particular . Under composition, the isometries of form the Euclidean group, which is generated by reflections, i.e., symmetries with respect to a plane, or mirror symmetries. An isometry is called direct when it preserves the orientation, and opposite when it does not. In the former case , while in the latter case . The identity map of is called the trivial symmetry.

The classification of the nontrivial isometries of Euclidean space includes reflections (in a plane), rotations (about an axis), and translations, and these combine in commutative pairs to form twists, glide reflections, and rotatory reflections. Composing three reflections in mutually perpendicular planes through a point , yields a central inversion (also called central symmetry), with center , i.e., a symmetry with respect to the point . The particular case of rotation by an angle is of special interest, and it is called a half-turn. Rotation symmetries are direct, while mirror and central symmetries are opposite.

###### Lemma 1.

A rational space curve different from a line cannot be invariant under a translation, glide reflection, or twist.

###### Proof.

If were invariant under translation by a vector , then, for any point on , the line would intersect in infinitely many points, implying that and contradicting that is an irreducible curve different from a line. Since applying a glide reflection twice yields a translation, cannot be invariant under a glide reflection either. Suppose is invariant under a twist with axis and angle , and let be the orthogonal projection onto a plane . Then the projection is a plane algebraic curve invariant under the rotation by the angle about the point . By Lemma 1 in AHM13-2 (), with . But then is invariant under the translation , which is a contradiction. ∎

Therefore, the rotations, reflections, and their combinations (like central inversions) are the only isometries leaving an irreducible algebraic space curve, different from a line, invariant. We say that an irreducible algebraic space curve is symmetric, if it is invariant under one of these (nontrivial) isometries. In that case, we distinguish between a mirror symmetry, rotation symmetry and central symmetry. If the curve is neither a line nor a circle, it has a finite number of symmetries AHM13-2 ().

We recall the following result from AHM13-2 (). For this purpose, let us recall first that a Möbius transformation (of the affine real line) is a rational function

In particular, we refer to as the trivial transformation. It is well known that the birational functions on the real line are the Möbius transformations SWPD ().

###### Theorem 2.

Let be a proper parametric curve as in (1). The curve is symmetric if and only if there exists a nontrivial isometry and nontrivial Möbius transformation for which we have a commutative diagram

 (4)

Moreover, for each isometry there exists a unique Möbius transformation that makes this diagram commute.

Note that is the parameter value corresponding to the image under the symmetry of the point on with parameter .

###### Lemma 3.

Let be a Möbius transformation associated to a parametrization  and isometry in the sense of Theorem 2. Then its coefficients can be assumed to be real, by dividing by a common complex number if necessary.

###### Proof.

For any proper parametrization and isometry the associated Möbius transformation maps the real line to itself. In particular, since

for any for which is defined, and are real, so that and . A similar argument for yields that and are real, implying that and . It follows that all coefficients of have a common argument . Therefore, after dividing the coefficients of by , the coefficients of can be assumed to be real. ∎

Let the curvature and torsion of a parametric curve be the functions

 κ=κx:=∥x′×x′′∥∥x′∥3,τ=τx:=⟨x′×x′′,x′′′⟩∥x′×x′′∥2

of the parameter . Note that is non-negative. The functions and are well-known rational differential invariants of the parametrization , in the sense that

 κf∘x=κx,τf∘x=det(Q)⋅τx (5)

for any isometry . This follows immediately from being orthogonal and the identity

 (Ma)×(Mb)=det(M)M−T(a×b), (6)

which holds for any invertible matrix and follows from a straightforward calculation. Although and are rational for any rational parametrization , the curvature is in general not rational.

The following lemma describes the behavior of the curvature and torsion under reparametrization, for instance by a Möbius transformation.

###### Lemma 4.

Let be the rational parametrization (1) and let , with open. Then

 κx∘ϕ=κx∘ϕ,τx∘ϕ=τx∘ϕ,

whenever both sides are defined.

###### Proof.

Writing and using the chain rule, one finds

 ~x′(t) =x′(ϕ(t))⋅ϕ′(t), ~x′′(t) =x′′(ϕ(t))⋅(ϕ′(t))2+x′(ϕ(t))⋅ϕ′′(t), ~x′′′(t) =x′′′(ϕ(t))⋅(ϕ′(t))3+3x′′(ϕ(t))⋅ϕ′(t)⋅ϕ′′(t)+x′(ϕ(t))⋅ϕ′′′(t),

whenever and is defined at . Therefore

 κx∘ϕ(t)=∥∥~x′(t)×~x′′(t)∥∥∥∥~x′(t)∥∥3=∥∥x′(ϕ(t))×x′′(ϕ(t))∥∥⋅|ϕ′(t)|3∥∥x′(ϕ(t))∥∥3⋅|ϕ′(t)|3=(κx∘ϕ)(t),

and similarly one finds . ∎

## 3 Symmetry detection

In this section we derive a criterion for the presence of nontrivial symmetries of curves of type (1), together with an efficient method for checking this criterion. The cases need to be checked separately, but are considered simultaneously using linked and signs consistently throughout the paper. The resulting method is summarized in Algorithm Symm.

### 3.1 A criterion for the presence of symmetries

For any parametric curve as in (1), write

 κ2x(t)=:A(t)B(t),τx(t)=:C(t)D(t),

with and pairs of coprime polynomials. Let

 G±x:=gcd(Kx,T±x), (7)

with

 Kx(t,s):=A(t)B(s)−A(s)B(t),T±x(t,s):=C(t)D(s)∓C(s)D(t) (8)

the result of clearing denominators in the equations

 κ2x(t)−κ2x(s)=0,τx(t)∓τx(s)=0. (9)

Similarly, associate to any Möbius transformation the Möbius-like polynomial

as the result of clearing denominators in . We call trivial when , i.e., when the associated Möbius transformation is the identity. Note that is irreducible since .

###### Theorem 5.

Consider the curve defined by in (1) and let be as above. Then has a nontrivial symmetry , with , if and only if there exists a nontrivial polynomial of type (10), associated with a Möbius transformation , such that divides and the parametrizations and have identical speed,

 ∥x′∥=∥(x∘φ)′∥. (11)

The zeroset of is the graph of , which is either a rectangular hyperbola with horizontal and vertical asymptotes when , or a line with nonzero and finite slope when . Whenever is a factor of , the corresponding hyperbola or line is contained in the zeroset of ; see Figure 1.

###### Proof of Theorem 5.

”: If is invariant under a nontrivial isometry , with , by Theorem 2 there exists a Möbius transformation such that . Let be the Möbius-like polynomial associated with . The points for which are the points satisfying and . This includes the zeroset of , since

 κx∘φ=κx∘φ=κf∘x=κx,τx∘φ=τx∘φ=τf∘x=det(Q)τx=±τx

by Lemma 4 and (5). Since is irreducible, Bézout’s theorem implies that divides and , and therefore as well. Furthermore, since is orthogonal, the parametrizations have equal speed,

 ∥(x∘φ)′∥=∥(f∘x)′∥=∥(Qx+b)′∥=∥Qx′∥=∥x′∥.

”: Let be the nontrivial transformation associated to . Let be such that is a regular point on for every , and consider the arc length function

 s=s(t):=∫tt0∥x′(t)∥dt,t∈I,

which (locally) has an infinitely differentiable inverse . By (11),

so that and are parametrized by arc length. Since divides , any zero of is also a zero of and , implying that and . Then, by repeatedly applying Lemma 4,

 κx∘t=κx∘t=κx∘φ∘t=κx∘φ∘t,τx∘t=τx∘t=±τx∘φ∘t=±τx∘φ∘t. (12)

The Fundamental Theorem of Space Curves (Docarmo, , p. 19) then implies that and coincide on up to an isometry with . Therefore and have infinitely many points in common. Since and are irreducible algebraic curves, it follows that and therefore is a symmetry of . ∎

Note that the polynomial cannot be identically 0. Indeed, is identically if and only if and are both identically , which happens precisely when and are both constant. If then is a line, if and is a nonzero constant then is a circle, and if are both constant but nonzero then is a circular helix, which is non-algebraic. All of these cases are excluded by hypothesis.

### 3.2 Finding the Möbius-like factors F of G±x

The criterion in Theorem 5 requires to check if a bivariate polynomial has real factors of the form , with . However, need not be rational numbers, so that we need to factor over the algebraic or real numbers. This problem has been studied by several authors C04 (); CG06 (); CGKW (); GR02 (). However, since in our case we are looking for factors of a specific form, we develop an ad hoc method to check the condition.

Let be the curve in the -plane defined by . Let be such that the vertical line at does not contain any zero of where the partial derivative vanishes; see Figure 1. These are the points for which the discriminant of does not vanish, which is up to a factor equal to the Sylvester resultant and has degree at most in , with the bidegree of . Therefore one can always find an integer abscissa with this property by checking for at most points whether the gcd of and is trivial.

If has a Möbius-like factor as in (10), then the zeroset of intersects in a single point satisfying

 (ct0+d)ξ−(at0+b)=0. (13)

Since , the equation implicitly defines a function in a neighborhood of . Moreover, by differentiating the identity once and twice with respect to , and evaluating at , we find the relations

 −a+ds′0+c⋅(ξ+t0s′0) =0, (14) ds′′0+c⋅(2s′0+t0s′′0) =0, (15)

where , , and . In order to find expressions for , , we now use that the function is also implicitly defined by , because is a factor of and . Differentiating once and twice the identity with respect to gives

 s′=−Gt(t,s)Gs(t,s),s′′=−Gtt(t,s)+2Gts(t,s)s′+Gss(t,s)(s′)2Gs(t,s). (16)

Evaluating these expressions at yields expressions and .

Now we distinguish the cases and . In the first case, we may assume by dividing all coefficients in the Möbius transformation by . In that case and (13)–(15) yield rational expressions

 c1(ξ):=−s′′02s′0+t0s′′0, a1(ξ):=s′0+c1(ξ)(ξ+t0s′0), b1(ξ):=−a1(ξ)t0+ξ+c1(ξ)t0ξ. (17)

The polynomial is a factor of if and only if the resultant is identically . Substituting , and into this resultant yields a polynomial , whose coefficients are rational functions of . Let be the gcd of the numerators of these coefficients and of . The real roots of for which are well defined and correspond to the Möbius-like factors of as in (10) with .

On the other hand, when we may assume , and (13)–(15) yield rational expressions

 a0(ξ):=ξ+t0s′0,b0(ξ):=−a0(ξ)t0+t0ξ. (18)

Substituting , and into the resultant yields a polynomial , whose coefficients are rational functions of . Let be the gcd of the numerators of these coefficients and . The real roots of for which and are well defined and is nonzero correspond to the Möbius-like factors of as in (10) with . We obtain the following theorem.

###### Theorem 6.

The polynomial has a real Möbius-like factor as in (10) with (resp. ) if and only if (resp. ) has a real root. Furthermore, every such real root provides a factor of this form.

Note that the cases and can be computed in parallel.

###### Example 1.

Consider the bivariate polynomial

 G(t,s)=3s4t4−6s4t3+3s4t2−6s2t4−s2t2+2s2t−s2+2t2.

The vertical line does not intersect the zeroset of in a point where vanishes, since the discriminant of is nonzero (see Figure 1). Evaluating (16) at yields

 s′0 =−18ξ4−97ξ2+4ξ(24ξ2−97), s′′0 =16416ξ10−206316ξ8+879669ξ6−1387682ξ4+55302ξ2+1552ξ3(24ξ2−97)3.

When , we may assume and Equations (17) yield

 c1(ξ) =−1216416ξ10−206316ξ8+879669ξ6−1387682ξ4+55302ξ2+15526048ξ10−66636ξ8+256371ξ6−456385ξ4+17666ξ2+1552, a1(ξ) =−12ξ(72ξ8+2019ξ6−21192ξ4+40138ξ2−4656)504ξ8−5511ξ6+20905ξ4−36290ξ2−1552, b1(ξ) =−(9504ξ10−163836ξ8+879621ξ6−1434145ξ4+133646ξ2−4656)ξ(504ξ8−5511ξ6+20905ξ4−36290ξ2−1552)(12ξ2−1).

Substituting these expressions into the resultant and taking the gcd of the numerators of its coefficients and yields a polynomial . We find for and for as factors of . In the case , we may assume and we get

 a0(ξ)=−(ξ2−8)(12ξ2−1)ξ(24ξ2−97),b0(ξ)=418ξ4−97ξ2+4ξ(24ξ2−97).

Here and we obtain for and for . The entire computation takes a fraction of a second when implemented in Sage on a modern laptop. For more details we refer to the worksheet accompanying this paper WebsiteGeorg ().

### 3.3 The complete algorithm

Let as in (1) be a parametric curve of degree . Distinguishing the cases , each tentative Möbius transformation can be written as

with a root of and as in (17), (18). Condition (11) can be checked as follows. Squaring and clearing denominators yields an equivalent polynomial condition

 Wξ(t)=wn(ξ)tn+wn−1(ξ)tn−1+⋯+w0(ξ)≡0 (19)

of degree . By Theorem 5, a root of corresponds to a symmetry of precisely when vanishes identically. In other words, every root of

 gcd(Rd,w0,…,wn) (20)

defines a Möbius transformation corresponding to a symmetry as in Theorem 2. We thus arrive at Algorithm Symm for determining the number of symmetries of the curve .

## 4 Determining the symmetries

Algorithm Symm detects whether the parametric curve from (1) has nontrivial symmetries. In the affirmative case we would like to determine these symmetries. By Theorem 2, every such symmetry corresponds to a Möbius transformation , which corresponds to a Möbius-like factor of computed by Algorithm Symm. In this section we shall see how the symmetry can be computed from .

The commutative diagram in Theorem 2 describes the identity

 Qx(t)+b=x(φ(t)). (21)

Let us distinguish the cases and . In the latter case, (21) becomes

 Qx(t)+b=x(φ(t))=x(~a/t+~b),~a:=b/c,~b:=a/c.

Applying the change of variables and writing , we obtain

 Qx(t)+b=~x(~at+~b). (22)

Without loss of generality, we assume that (respectively ), and therefore any of its derivatives, is well defined at (respectively ), and that are well defined, nonzero, and not parallel. The latter statement is equivalent to requiring that the curvature at is well defined and distinct from . This can always be achieved by applying a change of parameter of the type . Observe that can be determined before applying this change, because afterwards the new Möbius transformation is just .

Evaluating (22) at yields

 Qx(0)+b=~x(~b), (23)

while differentiating once and twice and evaluating at yields

 Qx′(0)=~a⋅~x′(~b),Qx′′(0)=~a2⋅~x′′(~b). (24)

Using (6) and that is orthogonal, taking the cross product in (24) yields

 Q(x′(0)×x′′(0))=det(Q)⋅~a3⋅~x′(~b)×~x′′(~b). (25)

Multiplying by the matrix therefore gives

 C:=[~a⋅~x′(~b), ~a2⋅~x′′(~b), det(Q)⋅~a3⋅~x′(~b)×~x′′(~b)]

and . One sets to find the orientation-preserving symmetries, and to find the orientation-reversing symmetries. One finds from (23).

Next we address the case . After dividing the coefficients of by , we may assume . As before, we assume that is well defined at , and we again assume that the curvature is well defined and nonzero. Differentiating (21) once and twice,

 Qx′(t) =x′(φ(t))⋅φ′(t)=x′(at+bct+1)Δ(ct+1)2, (26) Qx′′(t) (27) =x′′(at+bct+1)Δ2(ct+1)4−2x′(at+bct+1)cΔ(ct+1)3.

Evaluating (26) and (27) at yields

 Qx′(0)=x′(b)⋅Δ,Qx′′(0)=x′′(b)⋅Δ2−2x′(b)⋅cΔ. (28)

Using (6) and that is orthogonal, taking the cross product in (28) yields

 Q(x′(0)×x′′(0))=det(Q)⋅Δ3⋅x′(b)×x′′(b). (29)

Since is known, the matrix can again be determined from its action on , and , which is given by Equations (28) and (29). One finds by evaluating (21) at .

Once and are found, one can compute the set of fixed points of to determine the elements of the symmetry, i.e., the symmetry center, axis, or plane.

###### Example 2.

Let be the crunode space curve parametrized by

 x:t⟼(tt4+1,t2t4+1,t3t4+1).

Applying Algorithm Symm we get . The first factor corresponds to the identity map and the trivial symmetry . The second factor corresponds to the Möbius transformation . Clearly satisfies Condition (11), so that Theorem 5 implies that has a nontrivial, direct symmetry . With , , , , and using that ,

 B=⎡⎢⎣100020002⎤⎥⎦, C=⎡⎢⎣−10002000−2⎤⎥⎦, Q2:=CB−1=⎡⎢⎣−10001000−1⎤⎥⎦.

Evaluating (21) at gives , so that is invariant under , which is a half-turn about the -axis. Since there are no other factors in , there are no direct symmetries corresponding to a Möbius transformation with .

As for the opposite symmetries, applying Algorithm Symm yields , whose factors correspond to the Möbius transformations and . A direct computation shows that and satisfy Condition (11), and that they correspond to symmetries and , with

 Q3=⎡⎢⎣001010100⎤⎥⎦,Q4=⎡⎢⎣00−1010−100⎤⎥⎦.

The sets of fixed points of these isometries are the planes and , which intersect in the symmetry axis of the half-turn; see Figure 2.

###### Example 3.

Consider the family of daisies of increasing degree , which are given parametrically by

 x(t)=(uj∑i=0(−1)i(2j2i)u2j−2iv2i,vj∑i=0(−1)i(2j2i)u2j−2i