Planar and Toroidal Morphs Made Easier

We present simpler algorithms for two closely related morphing problems, both based on the barycentric interpolation paradigm introduced by Floater and Gotsman, which is in turn based on Floater's asymmetric extension of Tutte's classical spring-embedding theorem. First, we give a much simpler algorithm to construct piecewise-linear morphs between planar straight-line graphs. Specifically, given isomorphic straight-line drawings Γ_0 and Γ_1 of the same 3-connected planar graph G, with the same convex outer face, we construct a morph from Γ_0 to Γ_1 that consists of O(n) unidirectional morphing steps, in O(n^1+ω/2) time. Our algorithm entirely avoids the classical edge-collapsing strategy dating back to Cairns; instead, in each morphing step, we interpolate the pair of weights associated with a single edge. Second, we describe a natural extension of barycentric interpolation to geodesic graphs on the flat torus. Barycentric interpolation cannot be applied directly in this setting, because the linear systems defining intermediate vertex positions are not necessarily solvable. We describe a simple scaling strategy that circumvents this issue. Computing the appropriate scaling requires O(n^ω/2) time, after which we can can compute the drawing at any point in the morph in O(n^ω/2) time. Our algorithm is considerably simpler than the recent algorithm of Chambers et al. (arXiv:2007.07927) and produces more natural morphs. Our techniques also yield a simple proof of a conjecture of Connelly et al. for geodesic torus triangulations.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

09/15/2020

Drawing outer-1-planar graphs revisited

In a recent article (Auer et al, Algorithmica 2016) it was claimed that ...
07/15/2020

How to Morph Graphs on the Torus

We present the first algorithm to morph graphs on the torus. Given two i...
03/11/2021

Polygon-Universal Graphs

We study a fundamental question from graph drawing: given a pair (G,C) o...
08/29/2017

Beyond Outerplanarity

We study straight-line drawings of graphs where the vertices are placed ...
09/13/2019

Linear Size Planar Manhattan Network for Convex Point Sets

Let G = (V, E) be an edge-weighted geometric graph such that every edge ...
09/23/2017

A Simple Algorithm for Computing a Cycle Separator

We present a linear time algorithm for computing a cycle separator in a ...
10/04/2019

To reorient is easier than to orient: an on-line algorithm for reorientation of graphs

We define an on-line (incremental) algorithm that, given a (possibly inf...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Computing morphs between geometric objects is a fundamental problem that has been well studied, with many applications in graphics, animation, modeling, and more. A particularly well-studied setting is that of morphing between planar straight-line graphs. Formally, a morph between two isomorphic planar straight-line graphs and consists of a continuous family of planar straight-line graphs starting at and ending at .

We describe an extremely simple morphing algorithm for planar graphs, which simultaneously obtains properties of two earlier approaches: Floater and Gotsman’s barycentric interpolation method [28, 30, 50, 51, 52] results in morphs that are natural and visually appealing but are represented implicitly; variations on Cairns’ edge-collapse method [9, 10, 53, 1, 35] result in efficient explicit representations of morphs that are not useful for visualization. Our new algorithm efficiently computes an explicit piecewise-linear representation of a morph between drawings of the same -connected planar graph, that are potentially more useful for visualization than morphs based on Cairns’ method.

We also extend Floater and Gotsman’s planar morphing algorithm to geodesic graphs on the flat torus. Recent results of Luo, Wu, and Zhu [41] imply that Floater and Gotsman’s method directly generalizes to morphs between geodesic triangulations on surfaces of negative curvature, but a direct generalization to the torus generically fails [48]. Our extension is based on simple scaling strategy, and it yields more natural morphs than previous algorithms based on edge collapses [12]. Finally, our arguments yield a straightforward proof of a conjecture of Connelly, Henderson, Ho, and Starbird [18] on the structure of the deformation space of geodesic triangulations of the torus.

1.1 Related Work

1.1.1 Planar Morphs

The history of morphing arguably begins with Steinitz [49, p. 347], who proved that any 3-dimensional convex polyhedron can be continuously formed into any other convex polyhedron with the same 1-skeleton.

Cairns [9, 10] was the first to prove the existence of morphs between arbitrary isomorphic planar straight-line triangulations, using an inductive argument based on the idea of collapsing an edge from a low-degree vertex to one of its neighbors. Thomassen [53] extended Cairns’ proof to arbitrary planar straight-line graphs. Cairns and Thomassen’s proofs are constructive, but yield morphs consisting of an exponential number of steps.

Floater and Gotsman [28] proposed a more direct method to construct morphs between planar graphs, based on an extension by Floater [26] of Tutte’s classical spring embedding theorem [56]. Let be a straight-line drawing of a planar graph , such that the boundary of every face of is a strictly convex polygon. Then every interior vertex in is a strict convex combination of its neighbors; that is, we can associate a positive weight with each half-edge or dart in , such that the vertex positions in satisfy the linear system

(1)

Floater [26] proved that given arbitrary111Floater’s presentation assumes that for every interior vertex , but this assumption is clearly unnecessary. positive weights and an arbitrary convex outer face, solving linear system (1) yields a straight-line drawing of  with convex faces. Tutte’s original spring-embedding theorem [56] is the special case of this result where every dart has weight , but his proof extends verbatim to arbitrary symmetric weights, where for every edge  [33, 46, 54].

Floater and Gotsman [28] construct a morph between two convex drawings of the same planar graph , with the same outer face, by linearly interpolating between weights consistent with the initial and final drawings. Appropriate initial and final weights can be computed in time using, for example, Floater’s mean-value coordinates [27, 34]. The resulting morphs are natural and visually appealing. However, the motions of the vertices are only computed implicitly; vertex positions at any time can be computed in time by solving a linear system via nested dissection [38, 4], where is the matrix multiplication exponent [37, 3].222By solving the underlying linear system symbolically, it is possible to express the motion of each vertex as a rational function of degree , but computing vertex coordinates at any particular time from this representation requires time. Gotsman and Surazhsky generalized Floater and Gotsman’s technique to arbitrary planar straight-line graphs [51, 30, 50, 52].

A long series of later works, culminating in a paper by Alamdari, Angelini, Barrera-Cruz, Chan, Da Lozzo, Di Battista, Frati, Haxell, Lubiw, Patrignani, Roselli, Singla, and Wilkinson [1], describe an efficient algorithm to construct planar morphs with explicit piecewise-linear vertex trajectories, all ultimately based on Cairns’ inductive edge-collapsing strategy. Given any two isomorphic straight-line drawings (with the same rotation system and nesting structure) of the same -vertex planar graph, the resulting algorithm constructs a morph consisting of unidirectional morphing steps, in which all vertices move along parallel lines at fixed speeds. Thus, each vertex moves along a piecewise-linear path of complexity , and the entire morph has complexity . These results require several delicate arguments; in particular, to perturb the pseudomorphs defined by edge collapses and their reversals into true morphs. Recent results of Klemz [36] imply that this algorithm can be implemented to run in time on an appropriate real RAM model of computation. The resulting morph contracts all vertices into an exponentially small neighborhood and then expand them again, so it is not useful for visualization.

Angelini, Da Lozzo, Frati, Lubiw, Patrignani, and Roselli Angelini [5] consider the setting of convexity-preserving morphs between convex drawings; Kleist, Klemz, Lubiw, Schlipf, Staals, and Strash [35] consider morphing to convexify any 3-connected planar drawing. Both describe algorithms that produce piecewise-linear morphs consisting of steps, and that can be implemented to run in time . (Klemz [36] conjectures that both running times can be improved to .) Combining these algorithms results in an alternative piecewise-linear morph between 3-connected planar drawings.

1.1.2 Toroidal Morphs

Until recently, very little was known about morphing graphs on the torus or other more complex surfaces.

Tutte’s spring-embedding theorem was generalized to simple triangulations of surfaces with non-positive curvature by Colin de Verdière [17] and independently by Hass and Scott [31]. Delgado-Friedrichs [22], Lovász [39], and Gortler  [29] also independently proved an extension of Tutte’s theorem to graphs on the flat torus whose universal covers are simple and 3-connected. For any toroidal graph and any assignment of positive symmetric weights to the darts, solving a linear system similar to (1) yields vertex positions of a geodesic drawing with strictly convex faces [29, 25]; see Section 2 for details. Thus, if two isotopic geodesic torus graphs and can both be described by symmetric dart weights, linearly interpolating those weights yields a morph from to  [16]; in light of the authors’ toroidal Maxwell–Cremona correspondence [25], this can be seen as a natural toroidal analogue of Steinitz’s theorem on morphing convex polyhedra [49].

The restriction to symmetric weights is both nontrivial and significant. In a torus graph with convex faces, every vertex can be described as a convex combination of its neighbors, but not necessarily with symmetric weights. Moreover, the linear system expressing vertex positions as convex combinations of its neighbors is rank-deficient, and therefore is not solvable in general; see Appendix A for an example. Thus, Floater’s asymmetric extension of Tutte’s theorem does not directly generalize to the flat torus.

For similar reasons, Floater and Gotsman’s planar morphing algorithm also does not generalize. Suppose we are given two isotopic geodesic torus graphs  and , each with dart weights that express their vertices as convex combinations of their neighbors. Unfortunately, in general, interpolating those weights yields linear systems that have no solution; we give a simple example in Appendix A.

Steiner and Fischer [48] modify the system by fixing a single vertex, restoring full rank. However, solving the modified system does not necessarily yield a crossing-free drawing, because the fixed vertex may not lie in the convex hull of its neighbors.333Steiner and Fischer incorrectly claim [48, Section 2.2.1] that the resulting drawing has no “foldovers” except at the fixed vertex and its neighbors; see Appendix A. Moreover, even though the initial and final weights are consistent with crossing-free drawings, averages of those weights may not be. We give an example of this bad behavior in Appendix A.

Chambers, Erickson, Lin, and Parsa [12] described the first algorithm to morph between arbitrary essentially 3-connected geodesic torus graphs. Their algorithm uses a combination of Cairns’ edge-collapsing strategy and spring embeddings to construct a morph consisting of unidirectional morphing steps, in time. Like planar morphs built from edge collapses, these toroidal morphs contract vertices into small neighborhoods and thus are not suitable for visualization.

Recently, Luo  [41] generalized Floater’s theorem to geodesic triangulations of arbitrary closed Riemannian 2-manifolds with strictly negative curvature, extending the spring-embedding theorems of Colin de Verdière [17] and Hass and Scott [31] to asymmetric weights. Their result immediately implies that if two geodesic triangulations of such a surface are homotopic, then linearly interpolating the dart weights yields a continuous family of crossing-free geodesic drawings, or in other words, a morph. Their result applies only to surfaces with negative Euler characteristic; alas, the torus has Euler characteristic .

1.2 New Results

We describe two applications of Floater and Gotsman’s barycentric interpolation strategy, which yield simpler algorithms for morphing planar and toroidal graphs.

First we describe a very simple algorithm to construct piecewise-linear morphs between planar straight-line graphs. Given two isomorphic planar straight-line graphs and  with strictly convex faces and the same outer face, we construct a morph from to that consists of unidirectional morphing steps, in time. Our morphing algorithm computes barycentric weights for the darts in and in a preprocessing phase, and then for each morphing step, interpolates only the pair of weights associated with a single edge. Our key observation is that changing the weights for a single edge moves all vertices in the Floater drawing along lines parallel to . (The same observation was made for symmetric edge weights by Chambers  [12].) Our algorithm is significantly simpler than that of Angelini  [5] for computing convexity-preserving morphs. We then extend our algorithm to drawings with non-convex faces, using a simpler approach than Kleist  [35]. Fig. 1 shows a morph computed by our algorithm; in each frame, the weights of the red edge are about to change.

Figure 1: Incrementally morphing between planar graphs.

Next, we describe a natural extension of Floater and Gotsman’s method to geodesic graphs on the flat torus. Our key observation is that barycentric dart weights can be scaled so that barycentric interpolation works. Specifically, we call a weight assignment morphable if every column of the resulting Laplacian linear system sums to zero; averages of morphable weights are morphable. Given any weight assignment consistent with any convex drawing, we can guarantee morphability by scaling the weights of all darts leaving each vertex —or equivalently, scaling each row of the linear system—by a common positive scalar 

. This scaling obviously has no effect on the solution space of the system. Positivity of the scaling vector

follows from a weighted directed version of the matrix-tree theorem [55, 8, 20]. We can computing the appropriate scaling in time, after which we can compute any intermediate drawing in time, matching the performance of Floater and Gotsman exactly. The resulting morphs are natural and visually appealing, and our proofs of correctness are considerably simpler than those of Chambers  [12]. However, unlike Chambers , our new morphing algorithm does not compute explicit vertex trajectories. Fig. 2 shows a morph computed by our algorithm between two randomly shifted toroidal grids. (The authors’ Python implementation is available on request.)

Figure 2: Morphing between randomly shifted toroidal grids.

It remains an open question whether our results can be combined to compute explicit low-complexity piecewise-linear toroidal morphs without edge collapses. We offer some preliminary observations in Appendix B.

2 Definitions and Notation

2.1 Planar Graphs

Any planar straight-line drawing can be represented by a position matrix , each row  of which gives the location of some vertex . Thus, each edge is drawn as the straight-line segment . We call a planar drawing convex if it is crossing-free, every bounded face is a convex polygon, and the outer face is the complement of a convex polygon.

Formally, we regard each edge of any graph as a pair of opposing half-edges or darts, each directed from its tail to its head. We write to denote the reversal of any dart . For simple graphs, we write to denote the dart with tail and head . A barycentric weight vector for  assigns a positive real number to every dart of a graph, so that the vertex positions  satisfy Floater’s linear system (1). Conversely, for a fixed graph with a fixed convex outer face, the Floater drawing of with respect to a positive weight vector is the unique drawing whose vertex positions satisfy system (1).

A morph between two planar drawings and is a continuous family of crossing-free drawings parametrized by time, starting at and ending at . A morph is linear if each vertex moves along a straight line at uniform speed, and piecewise-linear if it is the concatenation of linear morphs. Any piecewise-linear morph can be described by a finite sequence of straight-line drawings, or their position matrices. A linear morph is unidirectional if vertices move along parallel lines.

2.2 Torus Graphs

The flat torus is the quotient space , also obtained by identifying opposite sides of the unit square . A geodesic on the flat torus is the image of a line segment in under the projection map where .

A (crossing-free) geodesic torus drawing of a graph maps its vertices to distinct points in  and its edges to simple, interior-disjoint geodesics. We explicitly consider geodesic drawings of graphs with loops and parallel edges. We write to declare that is a dart with tail and head ; we emphasize that (unlike in planar setting) there may be more than one such dart.

Every geodesic torus drawing of a graph is the projection of an infinite, doubly-periodic planar straight-line graph , called the universal cover of  [12]. We call essentially simple if its universal cover is simple, and essentially 3-connected if is 3-connected [43, 44]. Finally, we call a convex drawing if every face of is strictly convex. Every convex torus drawing is both essentially simple and essentially 3-connected, since every infinite planar graph with strictly convex faces is 3-connected [21].

Coordinate representations.

Following Chambers  [12], we use a coordinate representation for geodesic torus drawings that records

  • a position vector for each vertex , and

  • a translation vector for each dart , such that .

These vectors indicate that each dart is drawn as the projection of a line segment from  to in the universal cover . In particular, if we normalize all vertex positions to the half-open unit square , then each translation vector indicates the number of times crosses the vertical boundary of the unit square to the right, and the number of times  crosses the horizontal boundary of the unit square upward.

Two crossing-free drawings of the same graph on the torus are isotopic if one can be deformed into the other through a continuous family of (not necessarily geodesic) crossing-free drawings; such a deformation is called an isotopy. Two crossing-free drawings are isotopic if and only if their coordinate representations can be normalized so that their translation vectors agree; this condition can be tested in time [12, Theorem A.1][15]. A geodesic isotopy or morph is an isotopy in which all intermediate drawings are geodesic.

Barycentric weights.

In any convex torus drawing , the position of each vertex can be expressed as a convex combination of its neighbors, as follows. We can assign a weight  to each dart such that any coordinate representation of satisfies the linear system

(2)

We can express this linear system in matrix notation as , where

()

The (unnormalized, asymmetric) Laplacian matrix has rank  [48]. We call any positive weight vector satisfying system (2) barycentric for . Barycentric weights for any convex torus drawing can be computed in time using, for example, Floater’s mean-value coordinates [27, 34].

On the other hand, suppose we fix the graph and translation vectors consistent with an essentially 3-connected (but not necessarily geodesic) drawing of . Then for any positive weight vector , any solution to linear system (2) gives the vertex positions  of a convex drawing of  [29]. In this case, we say that the Floater drawing  realizes the weight vector , and we call the weight vector realizable for the graph . Every realizable weight vector is realized by a two-dimensional family of drawings that differ by translation.

Every symmetric positive weight vector (where ) is realizable: for any assignment of positive weights to the edges of , there is a corresponding convex torus drawing [17, 22, 39, 29, 31]. Realizable weights are not necessarily symmetric: there are convex torus drawings with only asymmetric barycentric weights. Conversely, positive asymmetric weights are not always realizable.

3 Morphing Planar Graphs Edge by Edge

We describe a very simple algorithm to morph planar straight-line graphs that combines the benefits of both the Floater and Gotsman approach [28, 30, 50, 51, 52] and the Cairns approach [9, 10, 53, 1, 35]. Our algorithm constructs a morph consisting of unidirectional morphing steps, in time. Because our morphs do not use edge collapses, they are also potentially good for visualization.

Fix a planar graph and a convex outer face. Let denote the position of vertex in the Floater drawing with respect to weight vector . The following lemma is a planar asymmetric version of Lemma 5.1 of Chambers  [12]. Intuitively, it states that changing the weights of the darts of a single edge moves each vertex in the Floater drawing along lines parallel to .

Lemma 3.1

Let and be arbitrary positive weight vectors such that or for some dart , but for all darts . For each vertex , the vector is parallel to the drawing of in .

Suppose has tail and head , and (by rotating the drawing if necessary) that is drawn parallel to the -axis. For each vertex , let and be the -coordinates of points and , respectively, so that . We need to prove that for every vertex .

Projecting linear system (1) for onto the -axis gives us

(3)

Swapping entries of with corresponding entries of in the system (3) changes at most two constraints, corresponding to the two endpoints and of . Moreover, in each changed constraint, the single changed coefficient is multiplied by , so the ’s also solve the corresponding system for . Since the system (3) and its counterpart for each have a unique solution, we conclude that for every vertex .

Under the assumptions of Lemma 3.1, linearly interpolating vertex positions from to yields a unidirectional linear morph [1, Corollary 7.2][12, Lemma 5.2]. It follows that we can morph between isomorphic convex drawings through a sequence of at most unidirectional linear morphing steps, one for each internal edge, following the algorithm in Fig. 3. Initial and final barycentric weight vectors can be found in time using, for example, Floater’s mean-value method [27, 34]. Each intermediate drawing can be computed in time using nested dissection [38, 4], for a total running time of .

:
barycentric weights for
barycentric weights for

for each internal edge

a dart of



return

Figure 3: Algorithm for morphing between convex planar drawings.

Because all Floater drawings are convex, Lemma 5.2 of Chambers  [12] implies that MorphConvex actually produces a convexity-preserving piecewise-linear morph; all faces remain convex throughout the morph. The existence of convexity-preserving morphs was first proved by Thomassen [53]; Angelini, Da Lozzo, Frati, Lubiw, Patrignani, and Roselli [5] described a piecewise-linear convexity-preserving morph consisting of steps. Our algorithm is significantly simpler than that of Angelini  [5].

Theorem 3.2

Given any two isomorphic convex planar drawings with vertices and the same convex outer face, we can compute a morph between them consisting of at most unidirectional linear morphing steps, in time.

The previous algorithm can be extended to morph between non-convex drawings by introducing intermediate convex drawings, as follows: Add edges to the initial and final drawings to decompose every face into convex polygons, compute barycentric weights for the resulting convex drawing, and then reduce the weights of each added edge (one-by-one) to zero, effectively deleting that edge. Dropping the added edges yields a piecewise-linear morph from each input drawing to a convex drawing. Again, each intermediate drawing can be computed in time. Our complete morphing algorithm is shown in Fig. 4. Our algorithm Convexify is considerably simpler than that of Kleist  [35]; however, unlike Kleist , our algorithm is not necessarily convexity-increasing.

:
convex decomposition of
barycentric weights for

for each new edge in

a dart of


without new edges
return :

last drawing in

last drawing in

return

Figure 4: Algorithm for morphing between general planar straight-line drawings.

In total, we perform one morphing step for each internal edge of , plus at most morphing steps for each bounded face with degree . Euler’s formula implies that a -connected planar graph has between and edges, and thus at most internal edges. Thus, we need to add at most edges to convexify the initial and final faces, so our morph consists of at most linear morphing steps. In summary:

Theorem 3.3

Given any two isomorphic -connected planar straight-line drawings with vertices and the same convex outer face, we can compute a morph between them consisting of at most unidirectional linear morphing steps, in time.

Models of computation.

The algorithm of Alamdari  [1] require a slightly nonstandard real RAM model of computation that supports exact square and exact cube roots. In contrast, Floater’s mean-value weights can be expressed in terms of areas and Euclidean lengths [34], which require only square roots to evaluate exactly. If initial and final barycentric weights are given, both Floater and Gotsman’s morphing algorithm [28] and our incremental algorithm use only basic arithmetic operations: addition, subtraction, multiplication, and division.

Even without exact roots, any integer-RAM or floating-point implementation of our morphing algorithm must contend with precision issues. A careful implementation of Alon and Yuster’s nested dissection algorithm [4] solves Floater’s linear system (1) exactly in bit operations, assuming all dart weights are -bit integers [4, 6]. Thus, at least then all weights are given as part of the input, an exact implementation of our morphing algorithm runs in on a standard integer RAM. Coordinates of Tutte/Floater drawings can require bits of precision to avoid collapsing or crossing edges [24, 23]; a canonical bad example is shown in Figure 5. Thus, the near-linear cost of exact arithmetic is unavoidable in the worst case.

Shen, Jiang, Zorin, and Panozzo [47] observe that floating-point implementations of Tutte’s algorithm suffer from robustness issues in practice. Shen  describe an iterative procedure to repair floating-point-Tutte drawings; however, it is unclear whether a similar procedure can be used to avoid precision issues in our algorithm while maintaining continuity of the resulting morph. It is also unclear whether precision issues in our algorithm can be avoided, or at least minimized, by carefully choosing the order in which edge weights are changed and/or by morphing through a carefully chosen intermediate drawing.

Figure 5: A family of weighted spring embeddings consisting of nested squares, with 2, 5, and 10 layers, respectively.

4 Morphable Weight Vectors on the Flat Torus

As observed by Steiner and Fischer [48], Floater and Gotsman’s morphing algorithm does not directly generalize to the toroidal setting, since not all positive weight vectors are realizable. In particular, given arbitrary barycentric weights and of two isotopic convex torus drawings, intermediate weights are not necessarily realizable; see Appendix A for an example. Thus, interpolating barycentric weights does not necessarily give us a morph.

To bypass this issue, we identify a subspace of morphable weight vectors, such that every convex torus drawing has a morphable barycentric weight vector, every morphable weight vector is realizable, and convex combinations of morphable weights are morphable. Specifically, a positive weight vector is morphable if each column of the matrices and sums to .444Directed graph Laplacians whose columns sum to zero are also called Eulerian; Cohen  [14] refer to the scaling process described by Lemma 4.3 as Eulerian scaling. The following lemma is immediate:

Lemma 4.1

Convex combinations of morphable weight vectors are morphable.

Lemma 4.2

Every morphable weight vector is realizable.

If is a morphable weight vector, then the th row of the linear system is implied by the other rows, so we can remove it. The resulting abbreviated linear system still has rank , so it has a (unique) solution.

Lemma 4.3

Given a barycentric weight vector for a convex torus drawing , a morphable barycentric weight vector for can be computed in time.

The matrix has rank , so there is a one-dimensional space of (row) vectors such that . We can compute a non-zero vector in time using nested dissection [38, 4, 2].

A directed version of the matrix tree theorem [55, 8, 20] implies that we can choose all to be positive. Specifically, let be the weighted directed graph whose weighted arcs correspond to the weighted darts of . An inward directed spanning tree is an acyclic spanning subgraph of  where every vertex except one (called the root) has out-degree . The weight of an inward directed spanning tree is the product of the weights of its arcs. For each , let  be the sum of the weights of all inward directed spanning trees rooted at vertex ; we have because all dart weights are positive. The directed matrix tree theorem implies that , as required; for an elementary proof, see De Leenheer [20, Theorem 3]. (See also Cohen  [14, Lemma 1] for an alternate proof using the Perron-Frobenius theorem.)

Define a new weight vector by setting for each dart . For each index , we immediately have , where is the position matrix for , so is in fact a barycentric weight vector for . Finally, we observe that and which imply that is morphable.

Theorem 4.4

Given coordinate representations of two isotopic essentially 3-connected geodesic torus drawings and , we can efficiently compute a morph from to . Specifically, after preprocessing time, we can compute any intermediate drawing during the morph in time.

Suppose and are convex drawings. First, if necessary, we normalize the given coordinate representations so that their translation vectors agree, in time [12, Theorem A.1]. Then we find barycentric weight vectors and for and , respectively, in time, for example using Floater’s mean-value coordinates [27, 34]. Following Lemma 4.3, we derive morphable weights and from and , respectively, in time. Finally, given any real number , we set and solve the linear system for the position matrix of an intermediate drawing ; Lemmas 4.1 and 4.2 imply that this system is solvable. The function is a convexity-preserving morph between and .

If the faces of or are not convex, we morph through an intermediate convex drawing, similarly to Chambers  [12, Theorem 8.1]. Let be the Floater drawing of  obtained by setting every dart weight to . Compute any triangulation  of , and then triangulate the convex faces using the same diagonals, to obtain a triangulation  isotopic to . Assign weight  to the darts of the diagonals in to obtain a barycentric weight vector for , which is symmetric and therefore morphable. Derive morphable weights for  using mean-value coordinates [27, 34] and Lemma 4.3. Then we can morph from to by weight interpolation, using the weight vector for any . Ignoring the diagonal edges gives us a morph from to . A symmetric procedure yields a morph from  to .

4.1 Deformation Space of Geodesic Torus Drawings

Our formulation of morphable weights provides a straightforward solution to a conjecture of Connelly [18] about the deformation space of geodesic torus triangulations. Bloch, Connelly, and Henderson [7] proved that for any planar straight-line triangulation of a convex polygon , the space of all planar straight-line triangulations of that are homeomorphic to  is contractible. (Cairns’ morphing theorem [9, 10] asserts only that this space is connected.) Simpler proofs of this theorem were recently given by Cerf [11] and Luo [40]; in particular, Luo observed that the Bloch–Connelly–Henderson theorem follows immediately from Floater’s barycentric embedding theorem.

Connelly  [18] conjectured that every isotopy class of geodesic triangulations on any surface with constant curvature is homotopy-equivalent to the group of isometries of  that are homotopic to the identity. In particular, is the rotation group and is the translation group ; for every other orientable surface without boundary, is trivial [45]. Very recently, Luo, Wu, and Zhu proved this conjecture for all surfaces of genus at least [41] and for the flat torus [42]; both proofs use nontrivial extensions of Floater’s theorem.

Here we offer a simpler proof for torus graphs; in fact, we prove a more general result about convex drawings instead of just triangulations.

Theorem 4.5

For any convex drawing on the flat torus , the space of all convex drawings isotopic to is homotopy equivalent to .

Fix a convex drawing of a graph with vertices and edges; without loss of generality, assume some vertex is positioned at . Let denote the space of all convex drawings of isotopic to , and let be the subspace of drawings in where vertex is positioned at . Every drawing in is a translation of a unique drawing in , so . Thus, to prove the theorem, it suffices to prove that is contractible.

Call a weight vector for normalized if , where the sum is over all darts of . Let denote the set of of all realizable weight vectors for , and let denote the set of all normalized morphable weight vectors for .

Lemma 4.1 implies that is convex and therefore contractible. (Specifically, is the interior of a -dimensional convex polytope in .)

Call two realizable weight vectors equivalent if there is a scaling vector such that for every dart . Because the Laplacian matrix has rank , Lemma 4.3 implies that every realizable weight is equivalent to a unique normalized morphable weight . It follows that is homeomorphic to and therefore contractible.

Now we follow the proof of Theorem 1.4 in Luo  [41]. Because every morphable weight is realizable, solving linear system (2) gives us a continuous map . Floater’s mean-value weights [27, 34] give us a continuous map such that is the identity map on . Because is contractible, the function is homotopic to the identity map on . We conclude that is homotopy equivalent to and therefore contractible.

5 Open Questions

It is natural to ask whether our “best-of-both-worlds” planar morph can be extended to graphs on the flat torus. In Appendix B, we prove a toroidal analog of Lemma 3.1 for realizable weight vectors; unfortunately, the main roadblock is that not all weight vectors are realizable. In particular, given a realizable weight vector (morphable or not), it is not clear when changing the weights for a single edge results in another realizable weight vector.

Several previous planar morphing algorithms [1, 35, 5, 19] rely on a certain convexifying procedure [32, 36, 35, 13], and are (potentially) faster than our algorithm via the implementation recently described by Klemz [36]. It is an open question whether the procedure can be extended to geodesic torus graphs.

One can also ask if the result can be extended to surfaces of higher genus. The recent results of Luo  [41] imply that Floater and Gotsman’s planar morphing algorithm [28] extends to geodesic triangulations on higher-genus surfaces of negative curvature; however, the existence of (any reasonable analog of) piecewise-linear morphs on such surfaces remains unknown.

Acknowledgments

We thank Anna Lubiw for asking questions about Lemma 5.1 of Chambers  [12], whose answers ultimately led to the discovery of Theorem 3.3, and for other helpful feedback. We also thank Yanwen Luo for making us aware of his recent work [40, 41, 42]. Finally, we thank the anonymous reviewers for their comments and helpful suggestions for improvement.

References

Appendix A Some Bad Examples

Here we provide several concrete examples showing that barycentric methods for drawing and morphing planar graphs do not immediately generalize to graphs on the torus.

First, we give an infinite family of non-realizable positive weight vectors. Let be any graph on the torus, and consider the weight vector that assigns weight to a single dart and weight  to every dart other than . (There is obviously nothing special about the values and here.)

Lemma A.1

is not a realizable weight vector for .

Let and . For the sake of argument, suppose the linear system has a solution; let be the resulting drawing. This system remains solvable if we remove row and arbitrarily fix  [48]. All dart weights in this truncated linear system are equal to , which implies that the drawing is identical to the Tutte drawing for the all-s weight vector. Comparing the two linear systems, we conclude that ; that is, the edge of  has length zero in . But this is impossible; every edge in a Tutte drawing has non-zero length [29, Lemma B.5].

Next, we give an example of two realizable weight vectors for the same torus graph whose averages are not realizable. Consider the toroidal drawings of shown in Fig. 6, which differ only in the position of vertex . We computed mean-value weights and for these drawings, normalized so that the weights of all edges leaving each vertex sum to  [27, 34]. Routine calculations (which we implemented in Python) now imply that the average weight is not realizable.

Figure 6: Isotopic drawings of whose normalized mean-value weights are not morphable.

Finally, we consider Steiner and Fischer’s approach [48] of fixing a single vertex, which restores the Laplacian linear system to full rank. The top row of Fig. 7 shows two isotopic drawings of a toroidal grid, one with a single row of vertices shifted to the left, the other with a single column of vertices shifted downward. Let and respectively denote the normalized mean-value weights for these drawings [27, 34]. The bottom left image in Fig. 7 shows the Steiner-Fischer drawing for the weight , with the red edges indicating the fixed vertex. This drawing is clearly not crossing-free; it also follows that the weight vector is not realizable.

The bottom right of Fig. 7 shows the corresponding Floater drawing for the realizable weight vector , where and are morphable weights derived by rescaling and , as described in Lemma 4.3.

Figure 7: A bad example of fixed-vertex weight interpolation; see the text for explanation.

Steiner and Fischer claim [48, Section 2.2.1] that their drawings have no “foldovers” except possibly at the fixed vertex and its neighbors. Here a “foldover” is a vertex in the drawing whose incident faces overlap (where formally, faces are determined by the reference drawing used to define the translation vectors). Close examination of Fig. 7 shows that this claim is incorrect.

Appendix B Trying to Morph Torus Graphs Edge by Edge

The following lemma generalizes Lemma 3.1 to the toroidal setting; it also generalizes Lemma 5.1 of Chambers  [12] to work for asymmetric weights.

Lemma B.1

Let and be arbitrary realizable weight vectors such that or for some dart , and for all darts . For every vertex , the vector is parallel to the drawing of in .

Suppose has tail and head . By the definition of crossing vectors, dart appears in as the projection of a dart in the universal cover from to . Fix a non-zero vector orthogonal to the vector and thus orthogonal to darts in . For each vertex , let and , and for each dart , let . Our choice of implies that . We need to prove that for every vertex .

Let and . The real vector is a solution to the linear system ; in fact, is the unique solution such that . Similarly, is the unique solution to an analogous equation with . We will prove that , so that in fact .

Let and . The matrices and differ in only four locations:

More concisely, we have . Similar calculations imply and therefore . It follows that

completing the proof.

Colin de Verdière [17] showed that all symmetric positive weights are realizable on the flat torus (see also [22, 29, 39, 31]); Chambers  [12] exploit this observation in their morphing algorithm. In the asymmetric case, however, it is unclear when changing the weights for a single edge in a realizable weight vector results in another realizable weight vector. We obtain the following partial result, via the analyses of Lemmas 4.3 and B.1.

Lemma B.2

Let be a realizable weight vector, and let be a positive row vector such that and . Let be another positive weight vector such that or for some dart , and for all darts . Set and . If , then is realizable.

Suppose has tail and head . The analysis of Lemma B.1 gives us

Because and , we immediately have and .

If , then and . It follows that a suitable scaling of is morphable, and therefore realizable, which implies that itself is also realizable.

In particular, when is symmetric, then we can choose to be the all-s vector, which implies that any weight satisfying the conditions of Lemma B.2 is also symmetric.