Symmetry Detection of Rational Space Curves from their Curvature and Torsion
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.
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
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
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.
A rational space curve different from a line cannot be invariant under a translation, glide reflection, or twist.
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 ().
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
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 .
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.
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
of the parameter . Note that is non-negative. The functions and are well-known rational differential invariants of the parametrization , in the sense that
for any isometry . This follows immediately from being orthogonal and the identity
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.
Let be the rational parametrization (1) and let , with open. Then
whenever both sides are defined.
Writing and using the chain rule, one finds
whenever and is defined at . Therefore
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
with and pairs of coprime polynomials. Let
the result of clearing denominators in the equations
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 .
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
“”: Let be the nontrivial transformation associated to . Let be such that is a regular point on for every , and consider the arc length function
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,
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 of
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
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
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
Evaluating these expressions at yields expressions and .
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 .
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.
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.
Consider the bivariate polynomial
When , we may assume and Equations (17) yield
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
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
of degree . By Theorem 5, a root of corresponds to a symmetry of precisely when vanishes identically. In other words, every root of
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
Let us distinguish the cases and . In the latter case, (21) becomes
Applying the change of variables and writing , we obtain
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
while differentiating once and twice and evaluating at yields
Multiplying by the matrix therefore gives
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,
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.
Let be the crunode space curve parametrized by
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 ,
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
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.
Consider the family of daisies of increasing degree , which are given parametrically by