Abstract
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 very simple algorithm to construct piecewise-linear morphs between planar straight-line graphs. Specifically, given isomorphic straight-line drawings \(\varGamma _0\) and \(\varGamma _1\) of the same 3-connected planar graph G, with the same convex outer face, we construct a morph from \(\varGamma _0\) to \(\varGamma _1\) that consists of O(n) unidirectional morphing steps, in \(O(n^{1+\omega /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^{\omega /2})\) time, after which we can compute the drawing at any point in the morph in \(O(n^{\omega /2})\) time. Our algorithm is considerably simpler than the recent algorithm of Chambers et al. and produces more natural morphs. Our techniques also yield a simple proof of a conjecture of Connelly et al. for geodesic torus triangulations.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
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 \(\varGamma _0\) and \(\varGamma _1\) consists of a continuous family of planar straight-line graphs \(\varGamma _t\) starting at \(\varGamma _0\) and ending at \(\varGamma _1\).
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 [24, 26, 43,44,45] results in morphs that are natural and visually appealing but are represented implicitly; variations on Cairns’ edge-collapse method [1, 7, 8, 31, 46] 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 3-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 et al. [37] 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 [42]. Our extension is based on simple scaling strategy, and it yields more natural morphs than previous algorithms based on edge collapses [9]. Finally, our arguments yield a straightforward proof of a conjecture of Connelly et al. [15] about the deformation space of geodesic triangulations.
1.1 Related Work
Planar Morphs. Cairns [7, 8] 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 [46] 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 [24] proposed a more direct method to construct morphs between planar graphs, based on an extension by Floater [22] of Tutte’s classical spring embedding theorem [49]. Let \(\varGamma \) be a straight-line drawing of a planar graph G, such that the boundary of every face of \(\varGamma \) is a strictly convex polygon. Then every interior vertex in \(\varGamma \) is a strict convex combination of its neighbors; that is, we can associate a positive weight with each half-edge or dart in G, such that the vertex positions \(p_v\) in \(\varGamma \) satisfy the linear system
Floater [22] proved that given arbitraryFootnote 1 positive weights and an arbitrary convex outer face, solving linear system (1) yields a straight-line drawing of G with convex faces. Tutte’s original spring-embedding theorem [49] is the special case of this result where every dart has weight 1, but his proof extends verbatim to arbitrary symmetric weights, where for every edge uv [29, 41, 47].
Floater and Gotsman [24] construct a morph between two convex drawings of the same planar graph G, 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 O(n) time using, for example, Floater’s mean-value coordinates [23, 30]. 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 \(O(n^{\omega /2})\) time by solving a linear system via nested dissection [4, 34], where \(\omega < 2.37286\) is the matrix multiplication exponent [3, 33]. Gotsman and Surazhsky generalized Floater and Gotsman’s technique to arbitrary planar straight-line graphs [26, 43,44,45].
Alamdari et al. [1] describe an efficient algorithm to construct planar morphs with explicit piecewise-linear vertex trajectories, 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 n-vertex planar graph, the algorithm constructs a morph consisting of O(n) 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 O(n), and the entire morph has complexity \(O(n^2)\). Recent results of Klemz [32] imply that this algorithm can be implemented to run in \(O(n^2\log n)\) time. The resulting morph contracts all vertices into an exponentially small neighborhood and then expand them again, so it is not useful for visualization.
Angelini et al. [5] consider the setting of convexity-preserving morphs between convex drawings; Kleist et al. [31] consider morphing to convexify any 3-connected planar drawing. Both describe algorithms that produce piecewise-linear morphs consisting of O(n) steps, and that can be implemented to run in time \(O(n^{1+\omega /2})\). (Klemz [32] conjectures that both running times can be improved to \(O(n^2\log n)\).) Combining these algorithms results in an alternative piecewise-linear morph between 3-connected planar drawings.
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 [14] and independently by Hass and Scott [27]. Delgado-Friedrichs [19], Lovász [35], and Gortler et al. [25] 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 [20, 25]; see Sect. 2 for details. Thus, if two isotopic geodesic torus graphs \(\varGamma _0\) and \(\varGamma _1\) can both be described by symmetric dart weights, linearly interpolating those weights yields a morph from \(\varGamma _0\) to \(\varGamma _1\) [13].
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 the full version [21] 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 \(\varGamma _0\) and \(\varGamma _1\), 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 the full version [21].
Steiner and Fischer [42] 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. 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 the full version [21].
Chambers et al. [9] 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 O(n) unidirectional morphing steps, in \(O(n^{1+\omega /2})\) 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 et al. [37] 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 [14] and Hass and Scott [27] 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; the torus has Euler characteristic 0.
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 \(\varGamma _0\) and \(\varGamma _1\) with strictly convex faces and the same outer face, we construct a morph from \(\varGamma _0\) to \(\varGamma _1\) that consists of O(n) unidirectional morphing steps, in \(O(n^{1+\omega /2})\) time. Our morphing algorithm computes barycentric weights for the darts in \(\varGamma _0\) and \(\varGamma _1\) 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 e moves all vertices in the Floater drawing along lines parallel to e. (The same observation was made for symmetric edge weights by Chambers et al. [9].) Our algorithm is significantly simpler than that of Angelini et al. [5] for computing convexity-preserving morphs. We then extend our algorithm to drawings with non-convex faces, using a simpler approach than Kleist et al. [31]. Figure 1 shows a morph computed by our algorithm; in each frame, the weights of the bold edge are about to change.
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 v—or equivalently, scaling each row of the linear system—by a common positive scalar \(\alpha _v\). This scaling obviously has no effect on the solution space of the system. Positivity of the scaling vector \(\alpha \) follows from a weighted directed version of the matrix-tree theorem [6, 17, 48]. We can computing the appropriate scaling in \(O(n^{\omega /2})\) time, after which we can compute any intermediate drawing in \(O(n^{\omega /2})\) 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 et al. [9]. However, unlike Chambers et al., our new morphing algorithm does not compute explicit vertex trajectories. Figure 2 shows a morph computed by our algorithm between two randomly shifted \(6\times 6\) toroidal grids. (The authors’ Python implementation is available on request.)
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 the full version [21].
2 Definitions and Notation
2.1 Planar Graphs
Any planar straight-line drawing \(\varGamma \) can be represented by a position matrix \(P \in \mathbb {R}^{n\times 2}\), each row \(p_v\) of which gives the location of some vertex v. Thus, each edge uv is drawn as the straight-line segment \(p_up_v\). 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 \({{\boldsymbol{\textit{rev}}}(d)}\) to denote the reversal of any dart d. For simple graphs, we write to denote the dart with tail u and head v. A barycentric weight vector for \(\varGamma \) assigns a positive real number to every dart of a graph, so that the vertex positions \(p_v\) satisfy Floater’s linear system (1). Conversely, for a fixed graph G with a fixed convex outer face, the Floater drawing \(\varGamma ^\lambda \) of G with respect to a positive weight vector \(\lambda \) is the unique drawing whose vertex positions \(p_v\) satisfy system (1).
A morph between two planar drawings \(\varGamma _0\) and \(\varGamma _1\) is a continuous family of crossing-free drawings \(\varGamma _t\) parametrized by time, starting at \(\varGamma _0\) and ending at \(\varGamma _1\). 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. A linear morph is unidirectional if vertices move along parallel lines.
2.2 Torus Graphs
The flat torus is the quotient space \(\mathbb {T}= \mathbb {R}^2 / \mathbb {Z}^2\), also obtained by identifying opposite sides of the unit square \([0,1]^2\). A geodesic on the flat torus is the image of a line segment in \(\mathbb {R}^2\) under the projection map \(\pi :\mathbb {R}^2 \rightarrow \mathbb {T}\) where \(\pi (x,y) = (x\bmod 1, y\bmod 1)\).
A (crossing-free) geodesic torus drawing \(\varGamma \) of a graph G maps its vertices to distinct points in \(\mathbb {T}\) and its edges to simple, interior-disjoint geodesics. We explicitly consider graphs containing loops and parallel edges. We write to declare that d is a dart (possibly one of many) with tail u and head v.
Every geodesic torus drawing \(\varGamma \) of a graph G is the projection of an infinite, doubly-periodic planar straight-line graph \(\widetilde{\varGamma }\), called the universal cover of \(\varGamma \) [9]. We call \(\varGamma \) essentially simple if its universal cover \(\widetilde{\varGamma }\) is simple, and essentially 3-connected if \(\widetilde{\varGamma }\) is 3-connected [39, 40]. Finally, we call \(\varGamma \) a convex drawing if every face of \(\widetilde{\varGamma }\) 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 [18].
Coordinate Representations. Following Chambers et al. [9], we use a coordinate representation \((P, \tau )\) for geodesic torus drawings that records
-
a position vector \(p_v \in \mathbb {R}^2\) for each vertex v, and
-
a translation vector \(\tau _d \in \mathbb {Z}^2\) for each dart d, such that \(\tau _{\textit{rev}(d)} = -\tau _d\).
These vectors indicate that each dart is drawn as the projection of a line segment from \(p_u\) to \(p_v+\tau _d\) in the universal cover \(\widetilde{\varGamma }\). In particular, if we normalize all vertex positions to the half-open unit square \([0,1)^2\), then each translation vector \(\tau _d\) indicates the number of times d crosses the vertical boundary of the unit square to the right, and the number of times d 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 O(n) time [9, Theorem A.1], [12]. A geodesic isotopy or morph is an isotopy in which all intermediate drawings are geodesic.
Barycentric Weights. In any convex torus drawing \(\varGamma \), the position \(p_v\) of each vertex v can be expressed as a convex combination of its neighbors, as follows. We can assign a weight \(\lambda _d > 0\) to each dart d such that any coordinate representation \((P, \tau )\) of \(\varGamma \) satisfies the linear system
We can express this linear system in matrix notation as \(L^{\lambda }P = H^{\lambda }\), where
The (unnormalized, asymmetric) Laplacian matrix \(L^\lambda \) has rank \(n-1\) [42]. We call any positive weight vector \(\lambda \) satisfying system (2) barycentric for \(\varGamma \). Barycentric weights for any convex torus drawing can be computed in O(n) time using, for example, Floater’s mean-value coordinates [23, 30].
On the other hand, suppose we fix the graph G and translation vectors \(\tau _d\) consistent with an essentially 3-connected (but not necessarily geodesic) drawing of G. Then for any positive weight vector \(\lambda \), any solution to linear system (2) gives the vertex positions \(p_v\) of a convex drawing \(\varGamma ^\lambda \) of G [25]. In this case, we say that the Floater drawing \(\varGamma ^\lambda \) realizes the weight vector \(\lambda \), and we call the weight vector \(\lambda \) realizable for the graph G. Every realizable weight vector is realized by a two-dimensional family of drawings that differ by translation.
Every symmetric positive weight vector (where \(\lambda _d = \lambda _{\textit{rev}(d)}\)) is realizable: for any assignment of positive weights to the edges of G, there is a corresponding convex torus drawing [14, 19, 25, 27, 35]. 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 [24, 26, 43,44,45] and the Cairns approach [1, 7, 8, 31, 46]. Our algorithm constructs a morph consisting of O(n) unidirectional morphing steps, in \(O(n^{1+\omega /2})\) time. Because our morphs do not use edge collapses, they are also potentially good for visualization.
Fix a planar graph G and a convex outer face. Let \(p^\lambda _v\) denote the position of vertex v in the Floater drawing \(\varGamma ^\lambda \) with respect to weight vector \(\lambda \). The following lemma is a planar asymmetric version of Lemma 5.1 of Chambers et al. [9]. Intuitively, it states that changing the weights of the darts of a single edge e moves each vertex in the Floater drawing along lines parallel to e.
Lemma 1
Let \(\lambda \) and \(\mu \) be arbitrary positive weight vectors such that \(\lambda _{d} \ne \mu _{d}\) or \(\lambda _{\textit{rev}(d)} \ne \mu _{\textit{rev}(d)}\) for some dart d, but \(\lambda _{d'} = \mu _{d'}\) for all darts \(d' \notin \left\{ d,\textit{rev}(d) \right\} \). For each vertex w, the vector \(p^\mu _w - p^\lambda _w\) is parallel to the drawing of d in \({\varGamma }^{\lambda }\).
Proof:
Suppose d has tail u and head v, and (by rotating the drawing if necessary) that d is drawn parallel to the x-axis. For each vertex i, let \(y^\lambda _i\) and \(y^\mu _i\) be the y-coordinates of points \(p^\lambda _i\) and \(p^\mu _i\), respectively, so that \(y^\lambda _u = y^\lambda _v\). We need to prove that \(y^\lambda _w = y^\mu _w\) for every vertex w.
Projecting linear system (1) for \(\lambda \) onto the y-axis gives us
Swapping entries of \(\lambda \) with corresponding entries of \(\mu \) in the system (3) changes at most two constraints, corresponding to the two endpoints u and v of d. Moreover, in each changed constraint, the single changed coefficient is multiplied by \(y^\lambda _u - y^\lambda _v = y^\lambda _v - y^\lambda _u = 0\), so the \(y^\lambda _i\)’s also solve the corresponding system for \(\mu \). Since the system (3) and its counterpart for \(\mu \) each have a unique solution, we conclude that \(y^\lambda _w = y^\mu _w\) for every vertex w. \(\Box \)
Under the assumptions of Lemma 1, linearly interpolating the vertex positions from \(\varGamma ^\lambda \) to \(\varGamma ^\mu \) yields a unidirectional linear morph [1, Corollary 7.2], [9, Lemma 5.2]. It follows that we can morph between isomorphic convex drawings through a sequence of at most \(3n-9\) 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 O(n) time using, for example, Floater’s mean-value method [23, 30]. Each intermediate drawing can be computed in \(O(n^{\omega /2})\) time using nested dissection [4, 34], for a total running time of \(O(n^{1+\omega /2})\).
Because all Floater drawings are convex, Lemma 5.2 of Chambers et al. [9] implies that MorphConvex actually produces a convexity-preserving piecewise-linear morph; all faces remain convex throughout the morph. Our algorithm is significantly simpler than that of Angelini et al. [5].
We can extend the previous algorithm to non-convex drawings by first morphing to convex drawings, as follows. We first add edges to the initial and final drawings to decompose every face into convex polygons, compute barycentric weights for the resulting 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 \(O(n^{\omega /2})\) time. Our complete morphing algorithm is shown in Fig. 4. Our algorithm Convexify is considerably simpler than that of Kleist et al. [31]; however, unlike Kleist et al., our algorithm is not necessarily convexity-increasing.
In total, we perform one morphing step for each internal edge of G, plus at most \(2(k-3)\) morphing steps for each bounded face with degree k. Euler’s formula implies that a 3-connected planar graph has between 1.5n and \(3n - 6\) edges, and thus at most \(3n - 9\) internal edges. Thus, we need to add at most \(1.5n - 6\) edges to convexify the initial and final faces, so our morph consists of at most \(4.5n - 15\) linear morphing steps. In summary:
Theorem 1
Given any two isomorphic 3-connected planar straight-line drawings with n vertices and the same convex outer face, we can compute a morph between them consisting of at most \(4.5n - 15\) unidirectional linear morphing steps, in \(O(n^{1+\omega /2})\) time.
4 Morphable Weight Vectors on the Flat Torus
As observed by Steiner and Fischer [42], Floater and Gotsman’s morphing algorithm does not directly generalize to the toroidal setting, since not all positive weight vectors \(\lambda \) are realizable. In particular, given arbitrary barycentric weights \(\lambda (0)\) and \(\lambda (1)\) of two isotopic convex torus drawings, intermediate weights \(\lambda (t) := (1-t)\lambda (0) + t\lambda (1)\) are not necessarily realizable; see the full version [21].
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 \(\lambda \) is morphable if each column of the matrices \(L^\lambda \) and \(H^\lambda \) sums to 0. The following lemma is immediate:
Lemma 2
Convex combinations of morphable weight vectors are morphable.
Lemma 3
Every morphable weight vector is realizable.
Proof:
If \(\lambda \) is a morphable weight vector, then the nth row of the linear system \(L^\lambda P = H^\lambda \) is implied by the other \(n-1\) rows, so we can remove it. The resulting abbreviated linear system still has rank \(n-1\), so it has a (unique) solution. \(\Box \)
Lemma 4
Given a barycentric weight vector \(\lambda \) for a convex torus drawing \(\varGamma \), a morphable barycentric weight vector for \(\varGamma \) can be computed in \(O(n^{\omega /2})\) time.
Proof:
The matrix \(L^{\lambda }\) has rank \(n-1\), so there is a one-dimensional space of (row) vectors \(\alpha = (\alpha _1,\dots ,\alpha _n)\) such that \(\alpha L^\lambda = (0,\dots ,0)\). We can compute a non-zero vector \(\alpha \) in \(O(n^{\omega /2})\) time using nested dissection [2, 4, 34].
A directed version of the matrix tree theorem [6, 17, 48] implies that we can choose all \(\alpha _i\) to be positive. Specifically, let \(G^\pm \) be the weighted directed graph whose weighted arcs correspond to the weighted darts of G. An inward directed spanning tree is an acyclic spanning subgraph of \(G^\pm \) where every vertex except one (called the root) has out-degree 1. The weight of an inward directed spanning tree is the product of the weights of its arcs. For each i, let \(\alpha _i\) be the sum of the weights of all inward directed spanning trees rooted at vertex i; we have \(\alpha _i>0\) because all dart weights are positive. The directed matrix tree theorem implies that \(\alpha L = 0\), as required; for an elementary proof, see De Leenheer [17, Theorem 3]. (See also Cohen et al. [11, Lemma 1].)
Define a new weight vector \(\mu \) by setting \(\mu _d := \alpha _{\textit{tail}(d)}\lambda _d\) for each dart d. For each index i, we immediately have \(L^{\mu }_i P = \alpha _i L^\lambda _i P = \alpha _i H^\lambda _i = H^{\mu }_i\), where P is the position matrix for \(\varGamma \), so \(\mu \) is in fact a barycentric weight vector for \(\varGamma \). Finally, we observe that \( (1,\dots ,1) L^\mu = \alpha L^\lambda = (0,\dots ,0) \) and \( (1,\dots ,1) H^\mu = \alpha H^\lambda = \alpha L^\lambda P = (0,\dots ,0)P = (0,0), \) which imply that \(\mu \) is morphable. \(\Box \)
Theorem 2
Given coordinate representations of two isotopic essentially 3-connected geodesic torus drawings \(\varGamma _0\) and \(\varGamma _1\), we can efficiently compute a morph from \(\varGamma _0\) to \(\varGamma _1\). Specifically, after \(O(n^{\omega /2})\) preprocessing time, we can compute any intermediate drawing during the morph in \(O(n^{\omega /2})\) time.
Proof:
Suppose \(\varGamma _0\) and \(\varGamma _1\) are convex drawings. First, if necessary, we normalize the given coordinate representations so that their translation vectors agree, in O(n) time [9, Theorem A.1]. Then we find barycentric weight vectors \(\lambda (0)\) and \(\lambda (1)\) for \(\varGamma _0\) and \(\varGamma _1\), respectively, in O(n) time, for example using Floater’s mean-value coordinates [23, 30]. Following Lemma 4, we derive morphable weights \(\mu (0)\) and \(\mu (1)\) from \(\lambda (0)\) and \(\lambda (1)\), respectively, in \(O(n^{\omega /2})\) time. Finally, given any real number \(0< t < 1\), we set \(\mu (t) := (1-t)\mu (0) + t\mu (1)\) and solve the linear system \(L^{\mu (t)} P^{(t)} = H^{\mu (t)}\) for the position matrix \(P^{(t)}\) of an intermediate drawing \(\varGamma ^{\mu (t)}\); Lemmas 2 and 3 imply that this system is solvable. The function \(t \mapsto \varGamma ^{\mu (t)}\) is a convexity-preserving morph between \(\varGamma _0\) and \(\varGamma _1\).
If the faces of \(\varGamma _0\) or \(\varGamma _1\) are not convex, we morph through an intermediate convex drawing, similarly to Chambers et al. [9, Theorem 8.1]. Let \(\varGamma _*\) be the Floater drawing of G obtained by setting every dart weight to 1. Compute any triangulation \(T_0\) of \(\varGamma _0\), and then triangulate the convex faces \(\varGamma _*\) using the same diagonals, to obtain a triangulation \(T_*\) isotopic to \(T_0\). Assign weight 0 to the darts of the diagonals in \(T_*\setminus \varGamma _*\) to obtain a barycentric weight vector \(\mu _*\) for \(T_*\), which is symmetric and therefore morphable. Derive morphable weights \(\mu _0\) for \(T_0\) using mean-value coordinates [23, 30] and Lemma 4. Then we can morph from \(T_0\) to \(T_*\) by weight interpolation, using the weight vector \(\mu (t) := (1-2t)\mu _0 + 2t\mu _*\) for any \(0\le t\le 1/2\). Ignoring the diagonal edges gives us a morph from \(\varGamma _0\) to \(\varGamma _*\). A symmetric procedure yields a morph from \(\varGamma _*\) to \(\varGamma _1\). \(\Box \)
In the full version [21], we use morphable weights to prove a conjecture of Connelly et al. [15] about the deformation space of geodesic torus triangulations.
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 the full version [21], we prove a toroidal analog of Lemma 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, 5, 16, 31] rely on a certain convexifying procedure [10, 28, 31, 32], and are (potentially) faster than our algorithm via the implementation recently described by Klemz [32]. 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 et al. [37] imply that Floater and Gotsman’s planar morphing algorithm [24] 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.
Notes
- 1.
Floater’s presentation assumes that for every interior vertex v, but this assumption is clearly unnecessary.
References
Alamdari, S., et al.: How to morph planar graph drawings. SIAM J. Comput. 46(2), 824–852 (2017). https://doi.org/10.1137/16M1069171
Aleksandrov, L., Djidjev, H.: Linear algorithms for partitioning embedded graphs of bounded genus. SIAM J. Discrete Math. 9(1), 129–150 (1996). https://doi.org/10.1137/S0895480194272183
Alman, J., Williams, V.V.: A refined laser method and faster matrix multiplication. In: Proceedings of the 32nd Annual ACM-SIAM Symposium Discrete Algorithms, October 2021. https://doi.org/10.1137/1.9781611976465.32
Alon, N., Yuster, R.: Matrix sparsification and nested dissection over arbitrary fields. J. ACM 60(4), 25:1–25:8 (2013). https://doi.org/10.1145/2508028.2505989
Angelini, P., Lozzo, G.D., Frati, F., Lubiw, A., Patrignani, M., Roselli, V.: Optimal morphs of convex drawings. In: Proceedings of 31st International Symposium on Computational Geometry, pp. 126–140. No. 34 in Leibniz International Proceedings in Informatics (2015)
Borchardt, C.W.: Ueber eine der interpolation entsprechende Darstellung der Eliminations-Resultante. J. Reine Angew. Math. 57, 111–121 (1860). https://doi.org/10.1515/crll.1860.57.111
Cairns, S.S.: Deformations of plane rectilinear complexes. Amer. Math. Monthly 51(5), 247–252 (1944). https://doi.org/10.2307/2304300
Cairns, S.S.: Isotopic deformations of geodesic complexes on the 2-sphere and on the plane. Ann. Math. 45(2), 207–217 (1944). https://doi.org/10.2307/1969263
Chambers, E.W., Erickson, J., Lin, P., Parsa, S.: How to morph graphs on the torus. In: Proceedings of 32nd Annual ACM-SIAM Symposium Discrete Algorithms, pp. 2759–2778 (2021). https://doi.org/10.1137/1.9781611976465.164
Chrobak, M., Goodrich, M.T., Tamassia, R.: Convex drawings of graphs in two and three dimensions (preliminary version). In: Proceedings of 12th Annual Symposium on Computational Geometry, pp. 319–328 (1996). https://doi.org/10.1145/237218.237401
Cohen, M.B., Kelner, J., Peebles, J., Peng, R., Sidford, A., Vladu, A.: Faster algorithms for computing the stationary distribution, simulating random walks, and more. In: Proceedings of 57th Annual IEEE Symposium on Foundations of Computer Science, pp. 583–592 (2016). https://doi.org/10.1109/FOCS.2016.69
Colin de Verdière, É., de Mesmay, A.: Testing graph isotopy on surfaces. Discrete Comput. Geom. 51(1), 171–206 (2013). https://doi.org/10.1007/s00454-013-9555-4
Colin de Verdière, É., Pocchiola, M., Vegter, G.: Tutte’s barycenter method applied to isotopies. Comput. Geom. Theory Appl. 26(1), 81–97 (2003). https://doi.org/10.1016/S0925-7721(02)00174-8
Colin de Verdière, Y.: Comment rendre géodésique une triangulation d’une surface? L’Enseignment Mathématique 37, 201–212 (1991). https://doi.org/10.5169/seals-58738
Connelly, R., Henderson, D.W., Ho, C.W., Starbird, M.: On the problems related to linear homeomorphisms, embeddings, and isotopies. In: Continua, Decompositions, Manifolds: Proceedings of Texas Topology Symposium, 1980, pp. 229–239. University of Texas Press (1983)
Da Lozzo, G., Di Battista, G., Frati, F., Patrignani, M., Roselli, V.: Upward planar morphs. Algorithmica 82(10), 2985–3017 (2020). https://doi.org/10.1007/s00453-020-00714-6
De Leenheer, P.: An elementary proof of a matrix tree theorem for directed graphs. SIAM Rev. 62(3), 716–726 (2020). https://doi.org/10.1137/19M1265193
Delgado-Friedrichs, O.: Barycentric drawings of periodic graphs. In: Liotta, G. (ed.) GD 2003. LNCS, vol. 2912, pp. 178–189. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-24595-7_17
Delgado-Friedrichs, O.: Equilibrium placement of periodic graphs and convexity of plane tilings. Discrete Comput. Geom. 33(1), 67–81 (2004). https://doi.org/10.1007/s00454-004-1147-x
Erickson, J., Lin, P.: A toroidal Maxwell-Cremona-Delaunay correspondence. In: Proceedings of 36th International Symposium on Computational Geometry, pp. 40:1–40:17. No. 164 in Leibniz International Proceedings in Informatics, Schloss Dagstuhl-Leibniz-Zentrum für Informatik (2020). https://doi.org/10.4230/LIPIcs.SoCG.2020.40
Erickson, J., Lin, P.: Planar and toroidal morphs made easier. Preprint, August 2021. https://arxiv.org/abs/2106.14086v2
Floater, M.S.: Parametric tilings and scattered data approximation. Int. J. Shape Modeling 4(3–4), 165–182 (1998). https://doi.org/10.1142/S021865439800012X
Floater, M.S.: Mean value coordinates. Comput. Aided Geom. Design 20(1), 19–27 (2003). https://doi.org/10.1016/S0167-8396(03)00002-5
Floater, M.S., Gotsman, C.: How to morph tilings injectively. J. Comput. Appl. Math. 101(1–2), 117–129 (1999). https://doi.org/10.1016/S0377-0427(98)00202-7
Gortler, S.J., Gotsman, C., Thurston, D.: Discrete one-forms on meshes and applications to 3D mesh parameterization. Comput. Aided Geom. Des. 23(2), 83–112 (2006). https://doi.org/10.1016/j.cagd.2005.05.002
Gotsman, C., Surazhsky, V.: Guaranteed intersection-free polygon morphing. Comput. Graph. 25(1), 67–75 (2001). https://doi.org/10.1016/S0097-8493(00)00108-4
Hass, J., Scott, P.: Simplicial energy and simplicial harmonic maps. Asian J. Math. 19(4), 593–636 (2015). https://doi.org/10.4310/AJM.2015.v19.n4.a2
Hong, S.H., Nagamochi, H.: Convex drawings of hierarchical planar graphs and clustered planar graphs. J. Discrete Algorithms 8(3), 282–295 (2010). https://doi.org/10.1016/j.jda.2009.05.003
Hopcroft, J.E., Kahn, P.J.: A paradigm for robust geometric algorithms. Algorithmica 7(1–6), 339–380 (1992). https://doi.org/10.1007/BF01758769
Hormann, K., Floater, M.S.: Mean value coordinates for arbitrary planar polygons. ACM Trans. Graph. 25(4), 1424–1441 (2006). https://doi.org/10.1145/1183287.1183295
Kleist, L., Klemz, B., Lubiw, A., Schlipf, L., Staals, F., Strash, D.: Convexity-increasing morphs of planar graphs. Comput. Geom. Theory Appl. 84, 69–88 (2019). https://doi.org/10.1016/j.comgeo.2019.07.007
Klemz, B.: Convex drawings of hierarchical graphs in linear time, with applications to planar graph morphing. In: Proceedings of the 29th Annual European Symposium on Algorithms. Leibniz International Proceedings in Informatics, vol. 204, pp. 57:1–57:15. Schloss Dagstuhl-Leibniz-Zentrum für Informatik (2021). https://doi.org/10.4230/LIPIcs.ESA.2021.57
Le Gall, F.: Powers of tensors and fast matrix multiplication. In: Proceedings of 25th International Symposium on Algebraic Computation, pp. 296–303 (2014). https://doi.org/10.1145/2608628.2608664
Lipton, R.J., Rose, D.J., Tarjan, R.E.: Generalized nested dissection. SIAM J. Numer. Anal. 16, 346–358 (1979). https://doi.org/10.1137/0716027
Lovász, L.: Discrete analytic functions: an exposition. In: Grigor’yan, A., Yau, S.T. (eds.) Eigenvalues of Laplacians and other geometric operators, pp. 241–273. No. 9 in Surveys in Differential Geometry, International Press (2004). https://doi.org/10.4310/SDG.2004.v9.n1.a7
Luo, Y.: Spaces of geodesic triangulations of surfaces. Preprint, August 2020. https://arxiv.org/abs/1910.03070v3
Luo, Y., Wu, T., Zhu, X.: The deformation space of geodesic triangulations and generalized Tutte’s embedding theorem. Preprint, May 2021. https://arxiv.org/abs/2105.00612
Luo, Y., Wu, T., Zhu, X.: The deformation space of geodesic triangulations of flat tori. Preprint, July 2021. https://arxiv.org/abs/2107.05159
Mohar, B.: Circle packings of maps–the Euclidean case. Rend. Sem. Mat. Fis. Milano 67(1), 191–206 (1997). https://doi.org/10.1007/BF02930499
Mohar, B.: Circle packings of maps in polynomial time. Europ. J. Combin. 18(7), 785–805 (1997). https://doi.org/10.1006/eujc.1996.0135
Richter-Gebert, J.: Realization Spaces of Polytopes. Lecture Notes in Mathematics, vol. 1643. Springer, Heidelberg (1996). https://doi.org/10.1007/BFb0093761
Steiner, D., Fischer, A.: Planar parameterization for closed 2-manifold genus-1 meshes. In: Proceedings of the 9th ACM Symposium Solid Modeling Applications, pp. 83–91 (2004)
Surazhsky, V., Gotsman, C.: Controllable morphing of compatible planar triangulations. ACM Trans. Graph. 20(4), 203–231 (2001). https://doi.org/10.1145/502783.502784
Surazhsky, V., Gotsman, C.: Morphing stick figures using optimal compatible triangulations. In: Proceedings of the 9th Pacific Conference on Computer Graphics Applications, pp. 40–49 (2001). https://doi.org/10.1109/PCCGA.2001.962856
Surazhsky, V., Gotsman, C.: Intrinsic morphing of compatible triangulations. Int. J. Shape Modeling 9(2), 191–201 (2003). https://doi.org/10.1142/S0218654303000115
Thomassen, C.: Deformations of plane graphs. J. Comb. Theory Ser. B 34(3), 244–257 (1983). https://doi.org/10.1016/0095-8956(83)90038-2
Thomassen, C.: Tutte’s spring theorem. J. Graph Theory 45(4), 275–280 (2004). https://doi.org/10.1002/jgt.10163
Tutte, W.T.: The dissection of equilateral triangles into equilateral triangles. Math. Proc. Cambridge Phil. Soc. 44(4), 463–482 (1948)
Tutte, W.T.: How to draw a graph. Proc. London Math. Soc. 13(3), 743–768 (1963). https://doi.org/10.1112/plms/s3-13.1.743
Acknowledgments
We thank Anna Lubiw for asking questions about Lemma 5.1 of Chambers et al. [9], whose answers ultimately led to the discovery of Theorem 1, and for other helpful feedback. We also thank Yanwen Luo for making us aware of his recent work [36,37,38]. Finally, we thank the anonymous reviewers for their comments and helpful suggestions for improvement.
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Switzerland AG
About this paper
Cite this paper
Erickson, J., Lin, P. (2021). Planar and Toroidal Morphs Made Easier. In: Purchase, H.C., Rutter, I. (eds) Graph Drawing and Network Visualization. GD 2021. Lecture Notes in Computer Science(), vol 12868. Springer, Cham. https://doi.org/10.1007/978-3-030-92931-2_9
Download citation
DOI: https://doi.org/10.1007/978-3-030-92931-2_9
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-92930-5
Online ISBN: 978-3-030-92931-2
eBook Packages: Computer ScienceComputer Science (R0)