cs0108020/jflip.tex
1: %% Flipping Cubical Meshes, Bern, Eppstein, and Erickson
2: 
3: \documentclass[11pt]{llncs}
4: \usepackage{graphicx}
5: \usepackage{cite}
6: \usepackage{url}
7: \urlstyle{same}
8: 
9: \usepackage{times}
10: \usepackage{mathfont}
11: \def\log{\mathop{{\rm log}}}
12: \def\min{\mathop{\rm min}}
13: \def\max{\mathop{\rm max}}
14: \def\sin{\mathop{\rm sin}}
15: \def\cos{\mathop{\rm cos}}
16: 
17: \newtheorem{open}{Open Problem}
18: 
19: \DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
20: \DeclareSymbolFontAlphabet{\Bbb}{AMSb}
21: \def\Real{\ensuremath{\Bbb R}}
22: 
23: \let\sevsfb\small
24: 
25: \setlength{\textwidth}{6.5in}
26: \setlength{\textheight}{9in}
27: \setlength{\evensidemargin}{0in}
28: \setlength{\oddsidemargin}{0in}
29: \setlength{\topmargin}{-.5in}
30: 
31: % magic to make big-O notation use script font
32: \mathcode`O="724F
33: 
34: % fix broken caption in llncs
35: \makeatletter
36: \def\hb@xt@{\hbox to }
37: \makeatother
38: 
39: % MARK ENDS OF PROOFS!
40: \let\oldendproof\endproof
41: \def\endproof{\qed\oldendproof}
42: 
43: \newcommand{\OCfigure}[3]{
44: \begin{figure}[t]
45:  \centering\includegraphics[width=#3]{#1}
46:  \caption{#2}
47:  \label{#1}
48: \end{figure}}
49: 
50: \let\SCfigure\OCfigure
51: %\renewcommand\topfraction{.5}
52: %\renewcommand\floatpagefraction{.7}
53: %\renewcommand\textfraction{.3}
54: \renewcommand\dbltopfraction{.7}
55: 
56: \pagestyle{plain}
57: 
58: \begin{document}
59: 
60: \title{Flipping Cubical Meshes} 
61: 
62: \author{Marshall Bern\inst{1},
63: David Eppstein\inst{2}, and
64: Jeff Erickson\inst{3}}
65: 
66: \institute{Xerox Palo Alto Research Center\\
67: 3333 Coyote Hill Rd., Palo Alto, CA 94304\\
68: \email{bern@parc.xerox.com}
69: \medskip
70: \and
71: University of California, Irvine\\
72: Dept. of Information \& Computer Science,
73: Irvine, CA 92697\\
74: \email{eppstein@ics.uci.edu}
75: \medskip
76: \and
77: Univ. of Illinois, Urbana-Champaign\\
78: Dept. of Computer Science,
79: 1304 W. Springfield Ave.,
80: Urbana, IL 61801\\
81: \email{jeffe@cs.uiuc.edu}}
82: 
83: \maketitle   
84: 
85: \begin{abstract}We define and examine flip operations
86: for quadrilateral and hexahedral meshes, similar to the flipping
87: transformations previously used in triangular and tetrahedral mesh
88: generation.
89: 
90: \medskip
91: {\bf Keywords:} quadrilateral meshing, hexahedral meshing, flip graph
92: connectivity, mesh improvement.
93: \end{abstract}
94: 
95: \section{Introduction}
96: 
97: In this paper we propose flipping transformations for cubical meshes,
98: such as quad and hex meshes. 
99: These flipping transformations are precise analogues of the 
100: well-known flipping transformations for simplicial meshes.  
101: We did not invent these transformations. 
102: They have already appeared---although they were not 
103: explicitly enumerated---in the mathematical
104: polytope literature~\cite{BilStu-AM-92,Zie-95}. 
105: We have not found any previous references 
106: in the meshing literature. The closest work seems
107: to be the quad refinement operations of Canann,
108: Muthukrishnan, and Phillips~\cite{CanMutPhi-EC-98}
109: and the hex reconnection primitives of 
110: Knupp and Mitchell~\cite{KnuMit-TR-99}.
111: 
112: As in the simplicial case, quad and hex flipping could be useful for mesh
113: generation, improvement, and refinement/derefinement. We also use
114: flipping to study existence questions for hexahedral
115: meshes.  Up until this present paper, the theoretical results on
116: quad-to-hex extension have been positive, suggesting that  (under
117: simple necessary conditions) it should always be possible.
118: Mitchell~\cite{Mit-STACS-96} and Thurston~\cite{Thu-93} independently
119: showed that any quad surface mesh with an even number of quadrilaterals,
120: and topologically equivalent to a sphere, can be extended to a {\it
121: topological\/} hex volume mesh, which allows elements to have warped,
122: nonplanar sides.  (An even number of surface quadrilaterals is a
123: necessary condition, because hex elements each have six sides,  and each
124: interior face will account for two hex sides.) 
125: Eppstein~\cite{Epp-CGTA-99} gave another proof of this result and
126: improved the complexity bound from $O(n^2)$ to $O(n)$ elements. Each of
127: the two proofs generalize to certain more topologically  complicated
128: inputs as well.  However, it has not been clear under what circumstances
129: these topological meshes can be realized using flat-faced cuboids. In
130: this context we discuss a simple 10-element boundary complex, the {\em
131: bicuboid}, which we have been unable to mesh, and use flipping to show
132: that many possible topological meshes for this complex are unrealizable.
133: 
134: This is primarily a theoretical paper---realizability
135: is not of great practical importance since the
136: isoparametric trilinear elements typically used with unstructured
137: hexahedral meshes allow the cells to have curved boundaries.
138: However, the existence or nonexistence of flat-faced meshes may
139: shed light on the question of how many curved elements are needed to achieve satisfactory mesh quality.  In addition,
140: our study of flip graph connectivity relates to mesh
141: improvement algorithms: by characterizing the connected components of the
142: quadrilateral flip graph for simply-connected regions
143: (Theorem~\ref{thm:qfc}) we show that any local improvement operation
144: that remeshes bounded regions of a quadrilateral mesh can be simulated
145: by a sequence of simpler flip and parity-change operations.
146: 
147: \section{Definitions}\label{def-sec}
148: 
149: A {\it polyhedron\/} is a set of closed planar
150: polygonal faces in $\Real^3$, that intersect
151: only at shared vertices and edges, and such that each edge is shared
152: by exactly two faces and each vertex is shared by exactly one
153: cycle of faces.\footnote{ This definition of polyhedron allows  
154: multiple connected components (two cubes can be one polyhedron!),
155: as well as voids and tunnels.
156: It disallows non-manifold boundaries, such as those used to 
157: model objects made from two different materials.}
158: A polyhedron divides $\Real^3$ into a bounded
159: {\it interior\/} and an unbounded {\it exterior\/}, each of which
160: may contain more than one connected component.
161: 
162: A {\it cuboid\/} in $\Real^d$ is a convex polytope, 
163: combinatorially equivalent to the unit cube $[0,1]^d$.  
164: {\it Combinatorial equivalence\/} means that the faces 
165: (vertices, edges, and so forth) of the cuboid are
166: in one-to-one correspondence with the faces of the unit cube,
167: and that this correspondence preserves intersections. 
168: In $\Real^2$ a cuboid is simply a convex quadrilateral,
169: called a {\it quad\/} for short. 
170: In $\Real^3$ a cuboid is a convex polyhedron called a {\it hex\/}. 
171: 
172: A {\it quad surface mesh\/} is a polyhedron
173: whose faces are all quads.
174: A {\it hex mesh\/} is a quad surface mesh, along with interior quads 
175: that subdivide the polyhedron interior into hexes.  
176: The intersection of any pair of hexes is either empty, a single
177: vertex, a single edge, or a single quad. 
178: Quad surface meshes and hex meshes are both examples
179: of {\it cubical complexes\/} \cite{BliBli-DM-98,JosZie-DCG-00,math.GT/0204085}, the analogue of simplicial complexes in which each $k$-dimensional face is a $k$-dimensional cuboid.
180: 
181: We also consider {\em topological hex meshes}: cubical complexes
182: homeomorphic to the input domain, with a boundary mesh combinatorially equivalent to that of the input.  In this context,
183: we call the quad and hex meshes defined earlier {\em geometric meshes}
184: to emphasize the geometric requirements on their cell shapes. Topological
185: meshes can be {\em realized} by specifying locations in the domain for
186: each internal vertex of the complex; the realization is a hex mesh if
187: each cell's eight vertex locations have a convex hull that is a cuboid,
188: and no two of these cuboids have intersecting interiors. A realization is
189: {\em self-intersecting} if each four vertices of a quadrilateral in the
190: mesh have locations that form a convex quadrilateral in the domain,
191: without respect for whether these quadrilaterals form the boundaries of
192: disjoint cuboids; a self-intersecting mesh can be viewed as a
193: generalized geometric mesh in which some cells are allowed to be
194: inverted.
195: 
196: \section{Flipping}\label{flipping-sec}
197: 
198: \OCfigure{triflips}{The 2-2 and 1-3 flips for triangular meshes
199: correspond to switching upper and lower facets of a tetrahedron.}
200: {4.2in}
201: 
202: \OCfigure{jeffqf}{Flips for quad
203: meshes correspond to switching upper and lower facets of a
204: three-dimensional cuboid.  The bold cuboid edges mark the
205: division between upper and lower facets.} {6.5in}
206: 
207: Consider the well-known {\it flip\/} transformation
208: for a triangular mesh, which
209: switches one diagonal for the other in a convex quadrilateral
210: $Q$ formed by two triangular elements sharing a side. 
211: We can think of this 2-2 flip (two elements in and
212: two elements out) as exchanging the upper and lower
213: facets of a three-dimensional simplex $P$ that projects to $Q$,
214: as shown on the left in Figure~\ref{triflips}.
215: This view leads us to consider the 
216: refinement transformation that subdivides a triangle into
217: three smaller ones by adding an interior vertex
218: as a 1-3 flip (Figure~\ref{triflips} right side). 
219: The reverse of the 1-3 flip is a 3-1 flip, which
220: derefines the triangulation by removing a vertex.
221: 
222: The almost-as-well-known flips for tetrahedral meshes
223: can be defined analogously by the exchange of the upper and lower
224: facets of a four-dimensional simplex.  
225: The flips include the 2-3 flip, which exchanges two tetrahedra
226: sharing a face for three sharing an edge, and the 1-4 flip
227: which subdivides a tetrahedron by adding an interior vertex,
228: along with their reverse flips.
229: 
230: This view of flipping extends to quad and hex meshes.
231: The flips for quad meshes are induced by the combinatorially
232: distinct exchanges of upper and lower facets of a three-dimensional cuboid,
233: as shown in Figure~\ref{jeffqf}, and the flips for hexahedral meshes are induced by the combinatorially distinct exchanges of upper and lower facets of a four-dimensional hypercube, as shown in Figure~\ref{hextriangle}.
234: 
235: The facets of a $d$-dimensional cube or hypercube can be grouped into $d$ opposite pairs.
236: In order to discover all possible flips, we describe any set of facets of a cube or hypercube by how it relates to these pairs.  To any set $S$ of cube or hypercube facets, we assign
237: a pair of integers $(X,Y)$, where $X$ denotes the number of pairs of facets eXcluded from $S$, and $Y$ denotes the number of pairs of facets Yncluded in $S$.
238: The remaining $d-X-Y$ pairs of facets have one of their two facets included in $S$, and the other facet excluded from $S$.  The symmetries of the hypercube include all permutations of opposite pairs of facets,
239: and all swaps of the two facets in each pair, so any two sets $S$ described by the same pair $(X,Y)$ are combinatorially equivalent.
240: 
241: The meshes in Figures \ref{jeffqf}
242: and~\ref{hextriangle} are labeled by these pairs of numbers.  If a set $S$ is represented by a pair $(X,Y)$, the complementary set is represented by pair $(Y,X)$.  So, a flip can be described as the replacement of a set of mesh cells combinatorially equivalent to the set $(X,Y)$ by a different set of cells combinatorially equivalent to $(Y,X)$.  In order to find all possible flips, it remains only to determine which pairs $(X,Y)$ form topological disks.
243: 
244: \begin{lemma}
245: Let $S$ be a set of facets of a $d$-hypercube described by pair $(X,Y)$.
246: Then $S$ forms a topological disk if and only if $X+Y<d$.
247: \end{lemma}
248: 
249: \begin{proof}
250: If $X+Y<d$, there is some facet $f\in S$ such that the opposite facet is not contained in $S$; then $f$ is adjacent to every facet in $S$.  We can retract all facets to $f$ by an affine transformation that shrinks the coordinate axis perpendicular to $f$; therefore $S$ has a retraction to a $(d-1)$-dimensional disk and is itself a disk.
251: 
252: On the other hand, suppose $X+Y=d$.  We show by induction on $X$ that $S$ has a retraction to a $Y$-sphere, and therefore cannot be a disk.  More specifically, we can retract $S$ in a facet-preserving way to the boundary of a $Y$-hypercube.
253: As a base case, if $X=0$ and $Y=d$, $S$ is the whole boundary of the $d$-hypercube.
254: Otherwise, $S$ is formed by removing a pair of facets from a set $S^+$ that can be retracted to a $(Y+1)$-hypercube $C^+$.  Removing the final two facets from $S^+$ corresponds, in its retraction, to removing two opposite facets from the boundary of $C^+$, and the remaining facets of $C^+$ can be contracted to a $Y$-hypercube by again using an affine map that contracts the coordinate axis perpendicular to the removed facets.
255: \end{proof}
256: 
257: We cannot allow sets $S$ that do not form disks to count as flips, because exchanging such a set for its complement would change the topology of the domain.
258: The possible flips in a $d$-dimensional cubical mesh correspond to subsets of a $(d+1)$-hypercube, and are therefore given by the pairs $(X,Y)$--$(Y,X)$ where $X+Y\le d$.
259: 
260: \begin{corollary}
261: The $d$-dimensional cubical meshes have
262: $(d+1)(d+2)/2$ combinatorially distinct flippable submeshes $(X,Y)$
263: which can be grouped into $\lfloor (d+2)^2/4 \rfloor$ flip pairs $(X,Y)$--$(Y,X)$.
264: \end{corollary}
265: 
266: The possible quadrilateral mesh flips are therefore
267: $(2,0)$--$(0,2)$ (changing one quadrilateral for five),
268: $(1,0)$--$(0,1)$ (changing two quadrilaterals for four),
269: and two changes of three for three quads:
270: $(0,0)$--$(0,0)$ and $(1,1)$--$(1,1)$.
271: along with their reverses. We can picture the $(2,0)$ mesh as corresponding to the unique lowest face of a cuboid, and the flipped $(0,2)$ mesh as the unique highest cuboid face together with the four neighboring side faces. The $(1,0)$--$(0,1)$ flip can similarly be pictured with
272: unique lowest and highest edges, and the $(0,0)$--$(0,0)$ flip can be pictured with unique lowest and highest vertices.  The remaining
273: $(1,1)$--$(1,1)$ flip transforms the top, front, and back faces of a cube into the bottom, left, and right faces.
274: 
275: \OCfigure{hextriangle}{The flips for hex
276: meshes correspond to switching upper and lower facets of a
277: four-dimensional cube.}{6.5in}
278: 
279: Analogously, the flips for hex meshes are induced by all possible
280: exchanges of upper and lower facets of a four-dimensional cuboid, as
281: shown in Figure~\ref{hextriangle}. The $(3,0)$--$(0,3)$ flip converts one hex to seven, and
282: can be pictured with unique lowest and highest facets of a hypercuboid in
283: $\Real^4$. The $(2,0)$--$(0,2)$ converts two hexes to six, and can be pictured with unique highest and lowest two-dimensional
284: faces of a hypercuboid. There are two different flips from three to five hexes: $(1,0)$--$(0,1)$ and
285: $(2,1)$--$(1,2)$.  In the $(2,1)$ three-hex mesh, the hexes are connected in a path. This mesh  can be pictured most symmetrically with a unique lowest hypercuboid facet
286: bordered by two other mutually disjoint almost-lowest facets, and the complementary $(1,2)$ mesh can be pictured with a unique highest facet (a sort of hex
287: tunnel in Figure~\ref{hextriangle}) surrounded by four other high facets.
288: The other three-hex mesh in our set of flips, $(1,0)$, has three hexes connected in a cycle,
289: and can be pictured  with a unique lowest hypercuboid
290: edge surrounded by three facets; its complementary five-hex mesh, $(0,1)$, has a
291: unique highest edge, whose endpoints do not appear on the lower convex
292: hull, surrounded by three facets.  Finally, there are two different flips involving sets of four hexes.
293: The $(1,1)$ flip corresponds to a lower-convex-hull facet connectivity of a clique minus an edge, and can be pictured with a unique lowest two-dimensional hypercuboid face; the $(0,0)$ flip has four mutually adjacent hexes, and can be pictured with a unique lowest hypercuboid vertex.
294: 
295: The regions of $\Real^3$ occupied by the cells of a flip are all combinatorially inequivalent:
296: a cuboid for the $(3,0)$--$(0,3)$ flip,
297: a bicuboid for the $(2,0)$--$(0,2)$ flip,
298: a twisted rhombic dodecahedron for the $(1,0)$--$(0,1)$ flip,
299: a tricuboid for the $(2,1)$--$(1,2)$ flip,
300: a fourteen-faced shape resembling a square orthobicupola for the $(1,1)$--$(1,1)$ flip, and a rhombic dodecahedron for the $(0,0)$--$(0,0)$ flip.
301: These shapes can be determined from the two-dimensional quadrilateral flips:
302: if one forms a polyhedron from the convex hull of two parallel copies of
303: an $(X,Y)$ quadrilateral mesh, the result is the region of an $(X,Y+1)$--$(Y+1,X)$ flip
304: (for instance, the $(0,2)$ bicuboid is formed by the convex hull of two parallel two-quadrilateral $(0,1)$ meshes), and if one instead forms the convex hull of an $(X,Y)$ mesh and a parallel $(Y,X)$ mesh, the resulting three-dimensional shape is the region for an $(X,Y)$--$(Y,X)$ flip.
305: 
306: Three of the hexahedral flips are listed by Knupp and
307: Mitchell~\cite{KnuMit-TR-99}: the $(3,0)$--$(0,3)$ flip is given as an example of
308: their ``pillowing'' transformation, the $(2,0)$--$(0,2)$ flip is given as an example
309: of their ``inflating hex ring'' transformation, and the $(0,0)$--$(0,0)$ flip
310: is called the ``rotate three hexes primitive'' despite its symmetric
311: action on four hexes.  The $(3,0)$--$(0,3)$ and $(2,0)$--$(0,2)$ flips are also used by
312: Mar\'echal~\cite{Mar-IMR-01} to reduce the complexity of some case
313: analysis in his conformal mesh refinement algorithm.
314: 
315: \section{Flippability}
316: 
317: \OCfigure{frustum}{The $(2,0)$--$(0,2)$ quad flip and $(3,0)$--$(0,3)$ hex flip can be performed
318: geometrically by projecting the truncation of a higher dimensional
319: pyramid.}{5.5in}
320: 
321: We say that a set of cells in a mesh is {\em flippable} if it can be
322: replaced by one of the flips described above.  For topological meshes,
323: a set of cells is flippable whenever it has the appropriate connectivity
324: pattern, but for geometric meshes additional conditions will likely
325: be required.  For instance, in triangular meshes, a pair of triangles is
326: flippable if and only if it forms a convex quadrilateral.
327: 
328: We say that a hex mesh is {\em generic} if no three vertices are
329: collinear and no two quadrilaterals are coplanar. We say that a type of flip is {\em automatically flippable}
330: if, whenever the configuration of cells on one side of the flip occurs
331: in a generic geometric or self-intersecting mesh, the flip can be
332: performed resulting in another generic (possibly self-intersecting)
333: mesh.  That is, for these types of flips, flippability of geometric
334: meshes may involve convexity constraints disallowing inverted elements,
335: but does not involve additional constraints on the flatness of cell
336: boundaries. In triangular, quadrilateral, or tetrahedral
337: meshes, all flips are automatically flippable, because all
338: cell boundaries are always flat.  The requirement that each
339: quadrilateral face be flat leads to more interesting theory in the
340: hexahedral case.
341: 
342: \begin{theorem}\label{automatic}
343: The $(3,0)$--$(0,3)$, $(0,3)$--$(3,0)$, $(2,0)$--$(0,2)$, $(0,2)$--$(2,0)$, and $(0,0)$--$(0,0)$ hex mesh flips are automatically flippable.
344: \end{theorem}
345: 
346: \begin{proof}
347: The result is trivial for the $(0,3)$--$(3,0)$ flip, since it just involves removal
348: of some faces from the $(0,3)$ mesh.  We can flip the $(3,0)$ mesh by viewing the
349: initial cuboid as the base of a pyramid in four dimensions, forming a
350: four-dimensional cuboid by truncating the pyramid's apex by a
351: hyperplane, and replacing the base by the orthogonal
352: projection of the truncated pyramid's remaining faces
353: (Figure~\ref{frustum}).  There are enough degrees of freedom in this
354: construction to preserve genericity.
355: 
356: To understand the $(2,0)$--$(0,2)$ flips, let's analyze the conditions under
357: which the six-cuboid $(0,2)$ mesh is possible. This mesh (shown in the upper
358: right corner of Figure~\ref{hextriangle}) breaks a {\em
359: bicuboid} into a {\em ring} of four cuboids connected to the bicuboid
360: sides, and a {\em core} of two cuboids connected to the top and bottom.
361: 
362: Let's first look at the ring. The planes $P_i$ ($i=0,1,2,3$) where its
363: cuboids connect to each other are determined by triples of
364: points on the bicuboid.  Each such plane contains four ring vertices,
365: three of which are already determined.  Fixing the position of the
366: fourth vertex $v_i$ on plane $P_i$ causes the planarity constraints of
367: two inner quadrilaterals to combine to fix the position of $v_{i+1}$ on
368: plane $P_{i+1}$, etc: $v_{i+1} = f_i(v_i)$.  In order for the ring to be
369: formed correctly, these functions must return back to the starting
370: position: $v_0=f_3(f_2(f_1(f_0(v_0))))$.  But each $f_i$ is an affine
371: transformation, and we already know three noncollinear points of $P_0$
372: that are returned to themselves by the composition
373: $f_3(f_2(f_1(f_0(x))))$: the three original bicuboid vertices.  So the
374: composition must be the identity map, and {\em any} point of $P_0$ is
375: mapped by the functions $f_i$ to four points determining a geometrically
376: embedded ring.
377: 
378: The only remaining question is, when are these four points coplanar?
379: We say that a point $x$ in $P_0$ is {\em plane-generating}
380: when its quadruple $x$, $f_0(x)$, $f_1(f_0(x))$, $f_2(f_1(f_0(x)))$ forms a planar quadrilateral.
381: Then the plane-generating points form a linear subspace of $P_0$: if you have any two such
382: points $p$ and $q$, and a third point $r$ on line $pq$, then each point in the quadruple of $r$
383: is just the same linear combination of the images of $p$ and $q$,
384: so the quadruple of $r$ lies on a plane that is the same linear combination
385: of the planes for $p$ and $q$.  Note also that we already know two points
386: in $P_0$ that determine a coplanar quadrilateral: the vertices of the top
387: and bottom faces of the bicuboid.  So if there were a third affinely
388: independent point determining a coplanar quadrilateral then {\em all}
389: points of $P_0$ would determine a coplanar quadrilateral.
390: So the existence of a flat middle face for the $(2,0)$ mesh determines the
391: existence of a flat middle face for the $(0,2)$ hex and vice versa.
392: Since there are two degrees of freedom for placing the points of the
393: middle face, we can do so in such a way that the mesh remains generic.
394: 
395: Finally, consider the $(0,0)$--$(0,0)$ flip. The hexes of a $(0,0)$ mesh form a rhombic dodecahedron.
396: Color the degree-4 vertices of the 
397: dodecahedron gray, and color the degree-3 vertices alternately white 
398: and black, so that the cuboids in the given $(0,0)$ mesh have
399: one white vertex each.  To show that it can be 
400: subdivided into black cuboids, lift the vertices of the mesh into 
401: $\Real^4$ by assigning $w$-coordinates as follows.  Place the interior 
402: point $a$ (the apex) on the plane $w=1$ and the gray vertices 
403: $g_1,g_2,g_3,g_4,g_5,g_6$ on the plane $w=0$.  Each quadruple 
404: $ag_ig_jg_k$ determines a hyperplane, and these hyperplanes determine 
405: the $w$-coordinates of the black and white vertices.  The lifted 
406: cuboid mesh is the upper surface of a hypercuboid.  The single 
407: remaining hypercuboid vertex~$z$ (the zenith) is located at the 
408: intersection of four hyperplanes, each determined by a black point and 
409: its three gray neighbors.  Projecting the lower facets of the 
410: resulting hypercuboid back to $\Real^3$ gives us the flipped cuboid 
411: mesh.  In particular, the projection of $z$ lies in the interior of 
412: the original rhombic dodecahedron.
413: \end{proof}
414: 
415: The same argument shows that, for geometric hex meshes, regardless of
416: genericity, the $(3,0)$--$(0,3)$, $(0,3)$--$(3,0)$, $(2,0)$--$(0,2)$, $(0,2)$--$(2,0)$,
417: and $(0,0)$--$(0,0)$ flips are possible if and only if
418: the set of cuboids to be flipped forms a strictly convex subset of the
419: domain.
420: 
421: \SCfigure{unflippable}{Unflippable $(2,1)$ configuration.} {2in}
422: 
423: \SCfigure{unflip11}{Unflippable $(1,1)$ configuration.} {2in}
424: 
425: \SCfigure{quartz}{Vertex labels of $(0,1)$ configuration for proof of $(1,0)$ unflippability.}{2in}
426: 
427: However, not all flips are automatically flippable:
428: 
429: \begin{theorem}
430: \label{stickshift}
431: The $(1,1)$--$(1,1)$, $(2,1)$--$(1,2)$ and $(1,2)$--$(2,1)$ flips are not automatically flippable for geometric or self-intersecting meshes.  The $(1,0)$--$(0,1)$ flip is not automatically flippable for geometric meshes.
432: \end{theorem}
433: 
434:  \begin{proof}
435: One
436: can form a set of vertices in the pattern of a $(2,1)$ mesh
437: by placing four axis-aligned squares in four parallel planes: two
438: large ones above each other in the two inner planes, and two small ones
439: inside the projections of the large squares in the remaining planes
440: (Figure~\ref{unflippable}).  With this placement, the three-hex $(2,1)$
441: mesh has all faces flat.  However, the small squares can be
442: translated arbitrarily, causing the diagonal interior faces of the
443: five-hex $(1,2)$ mesh (such as the face formed by the four marked vertices in
444: the figure) to be warped, so that the $(2,1)$ mesh is not flippable.
445: 
446: Similarly, by centering these four squares on the same axis, but then shifting a pair of corresponding vertices in the two central squares along the edges connecting these two vertices to their counterparts in the outer two squares, one can create an unflippable $(1,2)$ mesh.
447: 
448: Next, choose parameters $r>0$ and $0<\theta<\pi/4$, and let $p(i,j)$ denote the point
449: $(r\cos i\theta,r\sin i\theta,j)\in\Real^3$.  Then the eight points
450: $p(\pm 1,0)$, $p(\pm 2,1)$, $p(\pm 3,1)$, $p(\pm 4,0)$ form the vertices
451: of a cuboid in which all facets are trapezoids (shown as the top eight vertices
452: of Figure~\ref{unflip11}).
453: If we make another copy of this set of eight vertices, translated downwards, and connect each bottom face of the cuboid to each bottom face of the copy, we get a $(1,1)$ mesh.
454: However, if the copies of $p(-2,1)$ and $p(-3,1)$ (the black marked points in the figure) are shifted less far than the copies of $p(2,1)$ and $p(3,1)$ (the grey marked points), then these four points will form a skew quadrilateral, preventing this mesh from being flipped.
455: 
456: Finally, consider the $(1,0)$ mesh, and label the $14$ vertices of the corresponding
457: $(0,1)$ mesh as illustrated in
458: Figure~\ref{quartz}.  Suppose also that the segments $p_iq_i$, $az$, and $by$ are all parallel.
459: We have the following equations for the two interior vertices $b$ and $y$:
460: \begin{eqnarray*}
461: b &= p_6p_1p_2 \cap p_2p_3p_4 \cap p_4p_5p_6 \\
462: y &= q_6q_1q_2 \cap q_2q_3q_4 \cap q_4q_5q_6
463: \end{eqnarray*}
464: 
465: Here, each triple denotes a plane through the three points.
466: Now consider shrinking the mesh by simultaneously contracting the parallel edges
467: $p_iq_i$ and  $az$.  As long as these edges have non-zero
468: length, the $(0,1)$ mesh is still valid.  But if we make them short
469: enough, $by$ is inverted, so the top and bottom cubes in the $(1,0)$ mesh
470: intersect. Thus, the $(0,1)$--$(1,0)$
471: flip is not automatically flippable.
472: \end{proof}
473: 
474: \begin{open}
475: Is the $(1,0)$ flip automatically flippable for self-intersecting meshes?  Is the $(0,1)$ flip automatically flippable?
476: \end{open}
477: 
478: Our results on automatic flippability are related to scene analysis
479: questions studied by Whiteley and Sugihara (see~\cite{Whi-DCG-89}). In
480: its most basic form, scene analysis asks whether a given planar drawing
481: of vertices connected by faces is the projection  of flat faces in
482: $\Real^3$. Here we are interested in whether a given set of hexes is the
483: projection of a cuboid in $\Real^4$, however our three-dimensional
484: scenes are not generic (due to the flatness constraints) so Whiteley's
485: formula for the number of degrees of freedom does not seem to apply. It
486: would be interesting to apply the  matroid techniques used in scene
487: analysis and rigidity theory to hex meshing.
488: 
489: \section{Bicuboid}\label{bicuboid-sec}
490: 
491: \SCfigure{bicuboid-fig}{The bicuboid.}{2.5in}
492: 
493: \OCfigure{3x3}{3-by-3 subdivision of boundary can be
494: simulated by covering quads with four cuboids.}{5in}
495: 
496: \OCfigure{ngwbc}{Non-generic warped bicuboid (left)
497: with a self-intersecting mesh (right).}{4.5in}
498: 
499: In this section, we discuss a simple but important solid, called
500: a {\it bicuboid\/}. 
501: A bicuboid has the same topology as two hex elements sharing a face, as 
502: shown in Figure~\ref{bicuboid-fig}.  
503: We call a bicuboid {\it warped\/} if its central four vertices,
504: shown dotted in Figure~\ref{bicuboid-fig}, are not coplanar.
505: The bicuboid is important because, as we now show, the question of
506: whether topologically meshable domains have polyhedral hex meshes can be
507: reduced to this case, improving a reduction to a more complicated but
508: finite set of cases from our previous work~\cite{Epp-CGTA-99}.
509: 
510: \begin{theorem}\label{thm:bicuboid}
511: If every bicuboid has a geometric hex mesh, then any quad surface
512: mesh, with an even number of quad elements
513: and topologically equivalent to a sphere,
514: can be extended to a geometric hex volume mesh.
515: \end{theorem}
516: 
517: \begin{proof}
518: We start by finding a topological hex volume mesh
519: as in~\cite{Epp-CGTA-99,Mit-STACS-96,Thu-93}.
520: In such a mesh, each element is a topological cuboid,
521: meaning a cuboid with curved edges and faces.
522: We then subdivide all topological cuboids into 
523: $m \times m \times m$ grids of small topological cuboids
524: that are ``geometrically close'' to true cuboids. 
525: For example, if we require each face
526: of a small topological cuboid to fit within a thin slab
527: defined by parallel planes, we could pick a sufficiently large $m$
528: in order to make this possible.
529: 
530: Each small topological cuboid is then subdivided into seven pieces as
531: in a $(3,0)$--$(0,3)$ flip: a true 
532: cuboid in the center, and six ``almost-cuboidal'' warped hexes, each
533: with five planar faces and one nonplanar face.
534: The almost-cuboidal hexes of the subdivided mesh
535: match up in pairs to form bicuboids.  Meshing each bicuboid and
536: combining the results gives a mesh for the overall domain.
537: 
538: The only remaining problem is that the $m\times m\times m$ subdivision
539: also subdivides the boundary of the domain, which is not allowed.
540: To get around this problem, we let $m$ be a power of three,
541: and simulate the $3\times 3$ subdivision of a boundary quadrilateral by
542: placing four flat cuboids along it, as shown in Figure~\ref{3x3}, so that
543: the cuboids from adjacent boundary quadrilaterals meet face-to-face. The
544: number of degrees of freedom for the new cuboid vertices exceeds the
545: number of coplanarity constraints, allowing this construction to be
546: performed geometrically.
547: \end{proof}
548: 
549: Theorem~\ref{thm:bicuboid} shows that a bicuboid is
550: the crucial test case for the question of whether every
551: geometric quad surface mesh can be extended to a geometric hex mesh.
552: Theorem~\ref{automatic}, however, leads us to suspect that 
553: the answer is no, since it shows that a warped bicuboid cannot be
554: meshed by any generic mesh that can be reached from the two-hex mesh by
555: 
556: automatically flippable flips---reversing those flips would give a
557: geometric two-hex mesh, which does not exist.
558: 
559: \begin{open}
560: Does every warped bicuboid have a geometric hex mesh?
561: Does every warped cuboid have a generic
562: self-intersecting hex mesh?
563: \end{open}
564: 
565: The question is not open for non-generic self-intersecting meshes: a
566: warped cuboid formed by placing the four vertices of a warped
567: quadrilateral around the equator of a unit cube has a non-generic
568: self-intersecting six-hex mesh in which the inner quadrilateral's
569: vertices also lie on the surface of the cube (Figure~\ref{ngwbc}).
570: Less degenerately, if one has a warped bicuboid such that the convex hull of its top and bottom quadrilaterals forms a cuboid, then the toroidal difference between the bicuboid and this central cuboid can be partitioned into four triangular prisms; if we then slice the central cuboid in two by a plane, this plane divides a face of each prism in two, forming degenerate cuboids each with a single $180^\circ$ dihedral.
571: 
572: \section{Parity}
573: \label{parsec}
574: 
575: \OCfigure{quad2to3}{Parity-changing transformation of a quadrilateral
576: mesh.}
577: {3.25in}
578: 
579: \OCfigure{hexdual}{Cuboid divided into octants by three dual surfaces
580: (left), and the set of dual surfaces (right) for a more complicated
581: four-hex mesh (center).}{5in}
582: 
583: Each of the flip transformations preserves
584: the parity (odd or even) of the number of hex elements in the mesh.
585: In two dimensions, any meshable domain has meshes of both parities, as
586: can easily be seen by performing a two-to-three quad replacement (not a
587: flip), as shown in Figure~\ref{quad2to3}, so not all quad
588: meshes are obtainable by flipping from a given starting mesh.
589: A similar result holds for hex meshes, but the construction is more
590: complicated: 
591: 
592: \begin{theorem}\label{parity}
593: If a given quad surface mesh can be extended to a topological hex mesh,
594: it has topological hex meshes with both even and odd numbers of
595: hexes. 
596: \end{theorem}
597: 
598: \begin{proof}
599: Suppose we have some hex mesh, and we wish to find an alternative mesh
600: with the opposite parity.  Following Mitchell~\cite{Mit-STACS-96} and
601: Thurston~\cite{Thu-93}, we form three quadrilateral surface patches
602: within each hex, medial between each of the three pairs of opposite
603: faces; these patches join up to form an arrangement of surfaces, with
604: one triple intersection per cuboid (Figure~\ref{hexdual}).  The
605: boundaries of these surfaces form a graph on the domain boundary that is
606: the dual of the original quad surface mesh.
607: 
608: Conversely, if we have an arrangement of surfaces that meets the domain
609: boundary in the dual of the quad mesh, where at most three surfaces meet
610: in any point and we have no pinch points or other topological anomalies,
611: we can form a graph with one vertex per triple intersection and with
612: edges connecting the vertices along the curves where two surfaces meet. 
613: As long as this graph is connected and has no self-loops or multiple
614: adjacencies, we can form a valid topological hex mesh whose cuboids and
615: quadrilaterals correspond to the vertices and edges of this
616: graph.  If the graph does have self-loops or multiple adjacencies,
617: Mitchell~\cite{Mit-STACS-96} shows that they can be removed by the
618: ``pillowing'' ($(3,0)$--$(0,3)$ flip) operation.
619: 
620: In order to change the parity of the number of hexes in the mesh, then,
621: we can introduce a new surface in such a way that the number of triple
622: intersections increases by an odd number.  A suitable candidate is Boy's
623: surface~\cite{Boy-MA-03,Fra-87}, a projective plane embedded in
624: $\Real^3$ in such a way that there is one triple intersection point,
625: connected to itself by double-intersection curves in a pattern of three
626: self-loops.  We place a copy of Boy's surface within a
627: simply-connected region of the dual arrangement, in such a way that the
628: augmented arrangement remains connected and continues to avoid multiple
629: adjacencies.  Then each of the three loops of Boy's surface will cross
630: the other arrangement surfaces an even number of times, and the
631: double intersection curves of those other surfaces will cross the new
632: Boy's surface an even number of times, so that the only change in parity
633: will be from the single triple intersection of Boy's surface with
634: itself.  The resulting graph may have some self-loops or multiple
635: adjacencies, but we can remove these by pillowing without further
636: changes of parity.  The hex mesh formed by this graph will therefore
637: have the opposite parity from the mesh we started with.
638: \end{proof}
639: 
640: \SCfigure{Boy}{Boy's surface.}{2.5in}
641: 
642: \begin{open}
643: Are there domains with geometric hex meshes of both parities?
644: \end{open}
645: 
646: For quadrilateral meshes, one can allow parity-changing operations by
647: adding Figure~\ref{quad2to3} to the repertoire of flips.
648: 
649: \begin{open}
650: Is there a simpler parity-changing operation for hexahedral meshes?
651: What is the minimum possible number of hexahedra involved in such an operation?
652: \end{open}
653: 
654: For non-simply-connected domains, parity changing may be easier: for instance, a torus with a hexagonal cross section and an odd number of segments may be filled with either two or three hexes per segment, as in the planar parity-changing operation.  For instance, with three segments, this leads to an even mesh with six hexes and an odd mesh with nine.  However such a torus cannot be part of a mesh of a simply-connected domain because the complement of the torus would have a contractible odd cycle.
655: 
656: \section{Bubble-wrapping and Shelling}
657: 
658: \SCfigure{quaddual}{Curve arrangement dual to a quadrilateral
659: mesh.}{3.5in}
660: 
661: \OCfigure{dualjqf}{Actions of quadrilateral flips on dual curves.}{6.5in}
662: 
663: In order to prove our results in the next section on flip graph
664: connectivity, we need a technical strengthening of the Mitchell-Thurston
665: result on topological mesh existence: every ball-shaped domain with an
666: even number of quadrilateral faces has a {\em shellable} hexahedral mesh,
667: where a {\em shelling} of a complex~\cite{Zie-95} is an ordering of its
668: cells such that the union of the cells in any suffix of the ordering
669: forms a simply-connected set, and such that each cell meets the union of
670: the set of cells coming after it in the ordering in a simply-connected
671: subset.  In this section we prove a simpler version of this
672: strengthening: define a {\em pseudo-shelling} to be an ordering of the
673: cells such that the union of the cells in any suffix of the ordering is
674: simply connected, without the requirement on how each cell meets this
675: union.  That is, we want to remove elements one by one from our mesh in
676: such a way that the remaining elements always form a ball-shaped
677: domain.  Then we prove here that every simply-connected domain with an
678: even number of quadrilateral faces has a pseudo-shelling.
679: 
680: To do this, we take a dual view similar to that in
681: Theorem~\ref{parity} and in~\cite{Mue-EC-99}. For any topological quadrilateral
682: mesh on a topological-sphere surface, define a curve arrangement by
683: connecting each opposite pair of edge midpoints in each quadrilateral by
684: a segment of a curve (Figure~\ref{quaddual}).  This is a {\em simple}
685: arrangement, meaning that at most two curves intersect at any point, and
686: whenever two curves intersect they cross each other at a single point.
687: Because the surface has no boundary, the curves have no endpoints; each
688: curve crossing corresponds to a mesh element.  Each element removal in a
689: pseudo-shelling corresponds to a flip in the boundary quadrilateral
690: mesh, and we consider these flips in terms of their effect on the dual
691: curve arrangement (Figure~\ref{dualjqf}).  By finding a sequence of flips that can be used to
692: transform any such arrangement into the arrangement dual to a single
693: cube's boundary, we will show that a pseudo-shelling exists.
694: 
695: \SCfigure{bubblewrap}{Bubble-wrapping a curve arrangement}{4in}
696: 
697: \begin{lemma}
698: A simple curve arrangement is dual to a quadrilateral mesh if and only if
699: the graph formed by its crossing vertices and edges is 3-connected.
700: \end{lemma}
701: 
702: \begin{proof}
703: Any simple curve arrangement can be dualized by forming a quadrilateral
704: for each crossing, however the resulting collection of cells must meet
705: face-to-face and vertex-to-vertex to be a cell complex.
706:  It is not hard to see that, if the graph has
707: one or two vertices that separate it into nontrivial components, then
708: it must have a degeneracy that prevents it from being a cell complex;
709: for instance, a single articulation point corresponds to a
710: quadrilateral that is adjacent to itself along a pair of edges.
711: Conversely, if an arrangement forms a 3-connected planar graph, then by
712: Steinitz' theorem~\cite{Zie-95} it can be represented as the vertices and edges of a
713: convex polyhedron, and the polar polyhedron's facets form the desired
714: dual mesh.
715: \end{proof}
716: 
717: Since not all arrangements are 3-connected, it is convenient to work
718: with a modification of the mesh that is guaranteed to be 3-connected.
719: For a given arrangement $A$, we define the {\em bubble-wrapped
720: arrangement} $B(A)$ by adding curves to $A$ as follows: first, form a
721: small circular curve around each vertex of $A$.  Second, repeat this
722: step around each new crossing point formed by the new circles and the
723: edges of $A$.  Each edge has two circles added in this second step, and
724: these circles should be drawn so that they cross each other, and so that
725: the edge passes through their intersection.  Figure~\ref{bubblewrap}
726: depicts these bubble-wrapping steps.
727: 
728: \SCfigure{arrops}{Three operations on arrangement: pulling apart or
729: pushing together (left); inverting a triangle (middle), and switching
730: (right).}{3.5in}
731: 
732: \begin{lemma}
733: If $A$ is a connected arrangement, $B(A)$ is 3-connected.
734: \end{lemma}
735: 
736: \begin{lemma}\label{wrappable}
737: If $A$ is the dual to a quadrilateral mesh, $B(A)$ can be formed by
738: flips from $A$.
739: \end{lemma}
740: 
741: \begin{proof}
742: We create all the circles used in the bubble-wrapping process by $(2,0)$--$(0,2)$
743: flips, and cross the two circles on each edge by a $(1,0)$--$(0,1)$ flip.
744: It is not hard to see that each step in this process preserves
745: 3-connectivity of the arrangement.
746: \end{proof}
747: 
748: We now define three operations that modify the topology of a
749: curve arrangement in simpler ways than the modifications performed by the flip duals; in some ways these operations are similar to the well-known Reidemeister moves for knots in $\Real^3$, or the Whitney moves for curves in $\Real^2$ \cite{MehYap-SJC-91,Whi-CM-37}.  If the arrangement has a pair of crossings that are
750: connected by two edges, without other curves between them, we can {\em
751: pull apart} the crossings and form an arrangement with two fewer
752: vertices; conversely we can {\em push together} two nearby curves to add
753: two vertices to an arrangement (Figure~\ref{arrops}, left).
754: If the arrangement has a face formed by a triangle of three crossings
755: and three curves, we can {\em invert} the triangle by passing one curve
756: across the crossing of the other two (Figure~\ref{arrops}, middle).
757: Finally, if the arrangement contains two nearby connected and
758: non-crossing segments of curves, we can {\em switch} these segments by
759: removing them from the arrangement and reconnecting the curves by two
760: other non-crossing segments (Figure~\ref{arrops}, right).
761: 
762: \begin{lemma}\label{wrapped-ops}
763: Suppose two connected arrangements $A$ and $A'$ are related to each
764: other by one of the three operations described above.  Then $B(A)$ can
765: be transformed into $B(A')$ by a sequence of flips.
766: \end{lemma}
767: 
768: \SCfigure{invbub}{Steps in inversion of a triangle in a bubble-wrapped
769: arrangement.}{4.5in}
770: 
771: \begin{proof}
772: We begin by describing the simplest case, inversion of a triangle.
773: If $A$ were not bubble-wrapped, we could perform this operation by a
774: single $(0,0)$--$(0,0)$ flip, however the difficulty is in rearranging the
775: bubble-wrap curves to allow this flip without violating 3-connectivity.
776: Suppose
777: $A$ contains a triangle that can be inverted; its bubble-wrapped version
778: $B(A)$ is depicted in Figure~\ref{invbub} (left). We perform a $(2,0)$--$(0,2)$ flip
779: at one of the crossings of $B(A)$ in this triangle, adding a new curve
780: to the arrangement, and perform a sequence of $(1,0)$--$(0,1)$ and $(0,0)$--$(0,0)$ flips to
781: extend the region interior to this new curve until it covers the whole
782: triangle without extending outside the bubble-wrapping of the triangle
783: (Figure~\ref{invbub}, middle).  Next, we remove the nine curves forming
784: the bubble-wrapping around the triangle, by using $(0,0)$--$(0,0)$ and $(0,1)$--$(1,0)$ flips
785: to reduce the size of the region each one contains until it can be
786: removed by a $(0,2)$--$(2,0)$ flip (Figure~\ref{invbub}, right).  At this point the
787: triangle is exposed in the interior of the newly added curve and can be
788: inverted by a $(0,0)$--$(0,0)$ flip, after which we reverse the above steps to
789: restore the bubble-wrapping around the triangle.  It is not difficult to
790: verify that each step in this process can be performed while preserving
791: 3-connectivity of the overall arrangement.
792: 
793: Similarly, pulling apart and pushing together can be performed by
794: modifying the bubble-wrapping to remove the eight curves protecting the crossings and edges in the pulled-apart region, and replace them by a single curve surrounding an adjacent face of the arrangement,
795: in a way that allows the change to $A$ to
796: be made by a single $(1,0)$--$(0,1)$ or $(0,1)$--$(1,0)$ flip.
797: Switching can be performed by adding curves around the face of the arrangement between the switched edges, so that one curve crosses both switched edges and another curve passes between them, in a way that allows the change to $A$
798: to be made by a single $(1,1)$--$(1,1)$ flip.  The details are more complicated
799: than inversion, and we omit them.
800: \end{proof}
801: 
802: \SCfigure{switchcross}{Switching near a crossing.}{2.5in}
803: 
804: \SCfigure{switchloop}{Switching near a loop.}{3.75in}
805: 
806: \begin{lemma}
807: Any simply-connected domain, with a boundary consisting of an even
808: number of quadrilaterals, has a mesh with a pseudo-shelling.
809: \end{lemma}
810: 
811: \begin{proof}
812: As stated at the start of the section, we describe the pseudo-shelling
813: in terms of the effect each removal of a hexahedral element
814: causes to the curve arrangement $A$ dual to the domain boundary. By
815: Lemma~\ref{wrappable}, we can form an initial sequence of flips to
816: bubble-wrap $A$.  Next, we apply Lemma~\ref{wrapped-ops} to perform a
817: sequence of switching operations near each crossing of $A$.  Each such
818: operation creates a loop connecting the crossing to itself (Figure~\ref{switchcross}), and reduces
819: the number of crossings without such loops; it is always possible to
820: choose a way to perform the switching operation that preserves the
821: connectivity of the overall arrangement.
822: 
823: \SCfigure{loopcancel}{Removing two adjacent loops by a push,
824: invert, and two pull operations (the Whitney trick).}{5in}
825: 
826: After this step, the transformed arrangement must consist of a single
827: simple closed curve, decorated with a sequence of loops.  Since $A$
828: initially had an even number of crossings, and each flip preserves
829: parity, there are an even number of loops along the curve.  Note that
830: a switching operation near the crossing of a loop can result in a new loop
831: on the other side of the simple closed curve (Figure~\ref{switchloop}).  We perform additional
832: switching operations near the loops' crossings if necessary so that the
833: loops can be grouped into adjacent pairs, with one member of each pair
834: interior to the simple closed curve and one member exterior.  Each pair
835: can be removed by a sequence of a push, triangle inversion, and two pull
836: operations (Figure~\ref{loopcancel}); this sequence of operations is known to topologists as the {\em Whitney trick}.  After repeated Whitney tricks, the arrangement is transformed into a simple closed curve protected by bubbles; we remove bubbles until only two are left, forming
837: the dual arrangement of a cube, the desired final state of a
838: pseudo-shelling.
839: \end{proof}
840: 
841: The existence of a mesh with a shelling, rather than just a
842: pseudo-shelling, can be deduced via the methods used to prove
843: Theorem~\ref{thm:qfc} below.
844: 
845: \section{Connectivity}
846: 
847: The results of Section~\ref{parsec} naturally raise the question
848: whether parity is the only obstacle to reachability by flips, or whether
849: there might be some more subtle property of a mesh that prevents it being
850: formed by flipping from some other mesh.  Phrased another way, can every
851: mesh transformation that replaces some bounded submesh by another be
852: simulated by a sequence of flips?  Figure~\ref{hardtoflip} depicts
853: a difficult example, closely related to a hexahedral meshing problem
854: posed by Schneiders~\cite{Sch-Open}.  We leave finding a flip sequence
855: for this example as a puzzle for the reader.
856: 
857: For any domain with boundary mesh, and a type of mesh to use for
858: that domain, define the {\em flip graph}~\cite{San-JAMS-00} to be a graph with (infinitely
859: many) vertices corresponding to possible meshes of the
860: domain, and an edge connecting two vertices whenever the corresponding
861: two meshes can be transformed into each other by a single flip.  In this
862: framework, the question above can be phrased as asking for a description
863: of the connected components of the flip graph.
864: 
865: \begin{theorem}\label{thm:qfc}
866: The flip graph for topological quad meshes of any simply-connected
867: domain has exactly two connected components.
868: \end{theorem}
869: 
870: \begin{proof}
871: Due to parity, there must be at least two components. It remains to show
872: that any two meshes $M_1$ and $M_2$ of the same parity can be flipped
873: into each other. Consider a three-dimensional ball, the upper hemisphere
874: of which is partitioned into mesh $M_1$ and the lower hemisphere of
875: which is partitioned into mesh $M_2$, the two meshes meeting along the
876: equator of the ball at corresponding boundary edges.  Because $M_1$ and
877: $M_2$ have the same parity, the ball has an even number of quadrilateral
878: faces and so has a topological hex mesh $H$.
879: 
880: The possible existence of
881: pairs of quadrilaterals meeting in more than one edge (along the ball's
882: equator) does not lead to difficulties with degenerate meshes,
883: as we can remove these degeneracies by performing $(2,0)$--$(0,2)$ and $(0,2)$--$(2,0)$ flips in
884: $M_1$ and $M_2$ respectively.
885: 
886: We now wish to remove the cuboids from $H$ one by one,
887: reducing the initial ball to successively smaller shapes.  At each step
888: in the removal process, we will maintain a mesh $M$ describing 
889: describing the upper boundary of the remaining shape; initially
890: $M=M_1$.  As long as each removed cuboid touches the upper boundary of $M$ in a simply
891: connected set of faces, the change to $M$ caused by its removal is a
892: flip.  If we can remove all the cuboids in this way, we will have
893: flipped $M_1$ into $M_2$.
894: 
895: The requirement of simply-connected incidence with $M$ for each removed
896: cuboid is very similar to the definition of a {\em shelling} of a
897: complex, as described in the previous section; it differs from a shelling only in the requirement that cuboids be removed from the upper boundary.
898: As shown in the previous section, we can at least choose $H$ to
899: be pseudo-shellable.  We then partition the pseudo-shelling sequence into
900: {\em layers} of independent sets of hexahedral elements, such that no two elements in the
901: same layer share a facet.  Let $B_i$ denote the ball formed by the union
902: of layer $i$ and all successive layers. The boundary of each $B_i$ is a
903: quadrilateral mesh; we thicken each quadrilateral of this mesh into a
904: hexahedron, forming another layer of hexahedra separating layer $i$ from
905: layer $i-1$.  In terms of the dual surface arrangement this corresponds
906: to adding a topological-sphere surface surrounding $B_i$.
907: After performing this thickening process, we have a mesh with
908: alternating nested layers of cells: half of the layers consist of cells
909: connecting two nested and combinatorially equivalent quad meshes, while
910: the other half of the layers consist of cells not sharing any facets
911: with each other.
912: 
913: We order the cells of this mesh as follows: start by choosing some cell
914: adjacent to
915: $M_1$, then some cell in the next layer adjacent to the starting cell,
916: and continue ``drilling down'' by removing at most one cell from each
917: layer until reaching the center of the set of concentric spheres.  Then,
918: remove the layers from the inside out, removing all cells from a given
919: layer before starting the next outer layer.  The existence of an
920: appropriate ordering within each layer follows from the existence of
921: shellings for all planar complexes.
922: \end{proof}
923: 
924: \SCfigure{hardtoflip}{Transformation of one four-quad
925: mesh into another. Can it be simulated by a sequence of flips?}{3in}
926: 
927: \OCfigure{simflips}{Simulation of flips by parity-change operation:
928: half of $(1,1)$--$(1,1)$ flip (top), $(0,0)$--$(0,0)$ flip (bottom, first and third positions), and
929: $(1,0)$--$(0,1)$ flip (bottom,
930: second and fourth positions).}{5.25in}
931: 
932: \OCfigure{unflipq}{Transformation of a non-simply-connected quad mesh
933: that cannot be achieved by flips. The three edges indicated by hash
934: marks form a contractible triangle in the region
935: bounded above and below by the left and right meshes.}{5in}
936: 
937: As a consequence, the set of flips together with the parity-changing
938: operation depicted in Figure~\ref{quad2to3} form a complete set of local
939: mesh transformations, in that they are able to simulate any other
940: transformation operation.  In fact, since the parity-changing operation
941: can simulate many of the possible flips (Figure~\ref{simflips}),
942: it and the $(2,0)$--$(0,2)$ flip together form a complete set.
943: 
944: Combining the proof method with our previous linear-complexity
945: hex meshing techniques~\cite{Epp-CGTA-99} shows that any two equal-parity
946: quad meshes $M_1$ and $M_2$ of a simply-connected region can be flipped
947: one to the other (as topological meshes) in a number of steps linear in
948: the total number of cells in the two meshes.
949: 
950: Conversely to the techniques of this proof, any sequence of flips from
951: one quad mesh to another can be seen as forming a hex mesh of a three
952: dimensional region bounded above and below by the two meshes. The
953: assumption of simple connectivity is necessary for the result, as can be
954: seen from Figure~\ref{unflipq}: the region bounded by the two
955: meshes has odd cycles on its boundary (triangles formed by
956: one diagonal edge of the four-quad mesh and two edges of the eight-quad
957: mesh) that can be contracted to points in the interior of the region;
958: Mitchell~\cite{Mit-STACS-96} has shown that such contractible odd cycles
959: make hex meshing an impossibility. Therefore there is no way to
960: flip one mesh to the other, despite their having equal
961: parity.
962: 
963: \begin{open}
964: Can we characterize the flip graphs for geometric quad meshes of non-simply-connected regions?  Is the number of components of the flip graph determined by the number of topological holes in the region?
965: \end{open}
966: 
967: For the analogous problem of geometric triangle mesh flip graph
968: connectivity, a single connected component is known to exist due to the
969: ability to flip to the Delaunay triangulation, and the ability to
970: add or remove vertices by changing the weights of a regular
971: triangulation.  However, higher dimensional flip graphs can be disconnected~\cite{San-JAMS-00}.  There has also been some work on finding efficient
972: sequences of
973: flips~\cite{HanOttSch-JUCS-96,HurNoyUrr-DCG-99,SleTarThu-JAMS-88}
974: although finding the shortest such sequence even for triangulations of
975: convex polygons remains a major open problem.
976: 
977: \begin{open}
978: Can the flip graph for topological or geometric hex meshes of a simply
979: connected region have more than two components?
980: \end{open}
981: 
982: Answering this question seems to require a four dimensional
983: generalization of Mitchell and Thurston's result.  Even the tetrahedral
984: mesh version of this problem seems difficult: topological tetrahedron
985: mesh flip graphs are connected~\cite{Lic-KF-99},
986: and flipping can be used to form Delaunay
987: triangulations~\cite{EdeSha-Algo-96,Joe-CAGD-91}, but this does not seem
988: to imply geometric tetrahedral flip graph connectivity since the
989: flipping-based Delaunay construction algorithms
990: do not allow the initial triangulation or sequence of flips to be chosen
991: arbitrarily.
992: 
993: \section{Conclusions}\label{disc-sec}
994: 
995: In this paper, we have introduced (or at least popularized)
996: flipping moves for quad and hex meshes.  We have also considered the
997: conditions under which flips are realizable, tested the connectivity of
998: the flip graph, and used flipping to show some evidence that not all quad
999: surface meshes can be extended to  hex volume meshes. 
1000: 
1001: \section*{Acknowledgements}
1002: 
1003: A preliminary version of this paper appeared at the 10th International
1004: Meshing Roundtable.  Work of Eppstein was supported in part by NSF grants
1005: CCR-9258355 and CCR-9912338
1006: and by matching funds from Xerox Corp., and performed in
1007: part while at Xerox PARC.
1008: Work of Erickson was supported in part by a Sloan Fellowship and by NSF grants CCR-0093348 and DMR-0121695.
1009: We thank Scott Mitchell, Scott Canann, and the
1010: Roundtable referees for many helpful comments.
1011: 
1012: \raggedright
1013: \bibliographystyle{abuser}
1014: \bibliography{hexmesh}
1015: 
1016: \end{document}
1017: