This document is a thesis submitted by Nassim Mohamad Jibai to the American University of Beirut for the degree of Master of Science in Computer Science. The thesis describes the development of a library for implementing sequential and distributed recursive subdivision surfaces. Recursive subdivision schemes are used to generate smooth surfaces but implementing them is time consuming due to unique data structures required. The library defines objects to represent meshes and their components, and uses association spaces to store and retrieve references between refinement levels. This simplifies subdivision scheme implementation. The library also extends to support distributed subdivision surfaces by partitioning meshes across clusters and stitching refined submeshes.
1. AMERICAN UNIVERSITY OF BEIRUT
A Library for Implementing and Using Sequential and
Distributed Recursive Subdivision Surfaces
Nassim Mohamad Jibai
A thesis
submitted in partial fulfillment of the requirements
for the degree of Master of Science
to the Department of Computer Science
of the Faculty of Arts and Sciences
at the American University of Beirut
Beirut, Lebanon
March 2006
2. AMERICAN UNIVERSITY OF BEIRUT
A Library for Implementing and Using Sequential and
Distributed Recursive Subdivision Surfaces
Nassim Mohamad Jibai
Approved by:
Dr. Walid Keyrouz, Assistant Professor Advisor
Computer Science
Dr. Jihad Boulos, Assistant Professor Member of Committee
Computer Science
Dr. Ahmad Nasri, Professor Member of Committee
Computer Science
Date of thesis defense: March 01, 2006
3. AMERICAN UNIVERSITY OF BEIRUT
THESIS RELEASE FORM
I, Nassim Mohamad Jibai
authorize the American University of Beirut to supply copies of my thesis to
libraries or individuals upon request.
do not authorize the American University of Beirut to supply copies of my thesis
to libraries or individuals for a period of two years starting with the date of the
thesis defense.
Signature
Date
4. AN ABSTRACT OF THE THESIS OF
Nassim Mohamad Jibai for Master of Science
Major: Computer Science
Title: A Library for Implementing and Using Sequential and Distributed
Recursive Subdivision Surfaces
Recursive subdivision schemes are a representation of choice for the high-
fidelity modeling of geometric entities because of their flexibility and the smooth
surfaces they generate. However, implementing these schemes is time consuming.
Each subdivision scheme requires a unique data structure to accommodate the re-
lationships needed between geometric elements of successive refinement levels to
generate the new refined surface. Furthermore, recursive subdivision schemes are
memory bound. They rapidly exceed the memory resources of any machine. For in-
stance, the surface of a cube consists of 8 vertices, 12 edges, and 6 faces and occupies
2KB. This surface consists of nearly 1.6 million vertices, an equivalent number of
faces, and 3.2 million edges and occupies 432MB after only nine subdivision steps.
Distributed recursive subdivision surfaces can delay hitting these memory limits as
they use the aggregate memory resources available in a cluster.
This work develops a library to speedup the implementation of sequential
and distributed recursive subdivision surfaces. The library defines objects that rep-
resent meshes and their components (vertices, edges, and faces) and automatically
maintains their topologies. It implements an abstraction, association spaces, that
store and retrieve references to geometric elements at refinement level i+1 elements
based on their relationships with elements at refinement level i. The use of this
association space simplifies the implementation of recursive subdivision schemes es-
pecially when applied to non-regular surfaces. A subdivision scheme that uses the
association space consists of the following three steps: (1) instantiate subdivision
level i + 1 vertices out of existing level i and i + 1 vertices; (2) associate the newly
created vertices with the elements used to create them; (3) select the level i + 1
vertices using their associations and stitch them into the level i + 1 subdivision
surface.
The library takes advantage of cluster computing. It extends its underlying
representation of geometric objects to support distributed representations of subdi-
vision surfaces. The library partitions a mesh into submeshes and distributes them
among a cluster of machines. Each processor refines its own submesh independently
of other processors. The library then stitches the refined submeshes into one global
refined mesh. Furthermore, the distributed representation takes advantage of the
association space to automate the stitching of the refined submeshes into a global
refined surface.
iv
5. Acknowledgements
I want to express my appreciation to my advisor, Prof. Walid Keyrouz, for
his help and encouragement throughout my graduate work. I further want to extend
my thanks to the University Research Board (URB) at the American University of
Beirut for partially supporting me during my graduate work. I also want to thank
my friends, especially Elie Choueiri, for their constant support and encouragement.
I want to acknowledge the Center for Advanced Mathematical Sciences
(CAMS) at the American University of Beirut for the use of their resources in
running my computational experiments.
Last but not least, I want to thank my parents for their continuous and
unconditional support. Without them I would not have been where I am now. I
dedicate this thesis to them.
v
13. Chapter 1
Introduction
1.1 Problem Description & Motivation
Recursive subdivision schemes are a powerful tool for representing and generating
smooth surfaces. They recursively add vertices to the surface and possibly modify
or remove existing vertices. A recursive subdivision scheme is identified by a set of
rules R. Theses rules are applied to an initial polyhedron P 0 to generate a new more
refined polyhedron P1. At each refinement level i, the subdivision process takes as
input the polyhedron Pi and applies the rules R to generate a new polyhedron
Pi+1, which is the input to the next subdivision step [2]. These schemes vary in
their subdivision rules and their treatments of extraordinary points on the surface.
They are characterized from a user’s point of view by their rates of convergence and
the continuity and smoothness of the resulting surfaces.
Developing an implementation for a recursive subdivision scheme is time-consuming.
Developers must implement the infrastructure needed to represent a surface. This
includes a data structure that integrates the topology of a mesh. This data struc-
ture must handle irregular meshes. The difficulties arise when developers want
to implement a recursive subdivision scheme on top of the representation of sur-
faces. Such a representation can not handle inter-level relations between elements
of consecutive refinement levels required by recursive subdivision schemes. As such,
developers need to implement a set of functions to manipulate the elements of the
data structure to generate the new vertices for the refined mesh. These vertices
1
14. may be stored in temporary data structures before using them to generate the new
faces of the refined surface. Developers then need to retrieve the new vertices in a
prescribed order that is scheme dependent to form the faces of the refined surface.
Data structures that use array index calculations can only handle regular meshes.
As a result, they can not be used as an infrastructure for implementing recursive
subdivision schemes. This gives developers two alternatives. They either extend the
surface representation to accommodate these inter-level relations or implement an
additional data structure to do so. Both solutions are only effective for the intended
scheme. Implementing a different recursive subdivision scheme requires developers
to implement a new data structure to accommodate the needs of the scheme.
An additional implementation problem is a result of recursive subdivision schemes
being memory bound. The memory footprint of a subdivision surface increases
exponentially—typically by a factor of four for most of the well-known schemes.
They need only several steps of refinement to exceed the memory resources of any
machine. Table 1.1 shows the amount of memory a cube requires as its refinement
level increases. The surface of a cube consists of 8 vertices, 12 edges, and 6 faces
and occupies 2KB only. After the ninth subdivision step, this surface has nearly
1.6 million vertices, an equivalent number of faces, and 3.2 million edges and oc-
cupies 432MB. Every refinement step requires four times the amount of memory
needed by the previous refinement step. Distributed recursive subdivision surface
directly address the memory limitation. However, this increases the complexity of
the implementation.
The complexity of the implementation increases substantially when implement-
ing distributed subdivision surfaces. The mesh to be refined needs to be partitioned
into submeshes and distributed among the nodes of the cluster. Each node can then
subdivide its own partition. However, these subdivision steps must be coordinated.
The refined partitions must be stitched back into a single subdivided mesh.
This thesis presents a library for implementing and using sequential and dis-
tributed recursive subdivision surfaces. It also presents an abstraction, association
2
15. Levels Vertices Edges Faces Size
0 8 12 6 2.4 KB
1 26 48 24 7.4 KB
2 98 192 96 27.7 KB
3 386 768 384 108.7 KB
4 1,538 3,072 1,536 432.7 KB
5 6,146 12,288 6,144 1.7 MB
6 24,578 49,152 24,576 6.8 MB
7 98,306 196,608 98,304 27.0 MB
8 393,218 786,432 393,216 108.0 MB
9 1,572,866 3,145,728 1,572,864 432.0 MB
Table 1.1: Statistics of cube generated by Catmull-Clark
spaces, to simplify the implementation of recursive subdivision surfaces. The li-
brary’s purpose is to speedup the implementation of serial and distributed recursive
subdivision surfaces. This allows developers to experiment with newly developed
schemes. Furthermore, it retains all levels of the refined mesh. This allows the
library to support using multilevel techniques to simulate and analyze physical phe-
nomena, for instance finite elements.
1.2 Recursive Subdivision Library
The library’s general approach is to provide an infrastructure that supports the
implementation of recursive subdivision schemes. The library implements an ab-
straction, association spaces, which simplifies the implementation of recursive sub-
division schemes. The association space allows the establishment of associations be-
tween elements at successive refinement levels. It then allows the retrieval of these
associations by querying the association space from the coarse to the refined level.
It simplifies the implementation of recursive subdivision schemes by decoupling the
generation of the vertices at the refined mesh from establishing the topological con-
nectivity of these vertices.
The usage of the library for implementing recursive subdivision is as follows:
1. Generate the vertices of the refined mesh from vertices of the coarse mesh; this
computation is specific to each scheme.
3
16. 2. Associate the new vertices with the elements at the coarse level used to derive
them.
3. Retrieve the new vertices in an order prescribed by the scheme being imple-
mented. The new vertices are retrieved by querying the association space using
their associated elements at the coarse level. Inter-connect the new vertices to
form the faces of the refined mesh.
1.3 Cluster Computing
Cluster computing is one of the techniques of choice for solving massive computa-
tional problems ranging from weather modeling, traffic simulations, and financial
engineering. It takes advantage of improvements in the performance of modern
hardware by organizing commodity off the shelf computers (or PCs) via a high-
speed communication network at the software level. Communications among the
clustered computers are assisted by message passing libraries such as MPI [6, 7].
The distributed library extends the serial library by adding a Communications
level. This provides functionality that is built on top of MPI [6, 7], Metis [28], and
ParMetis [29]. MPI provides message-passing facilities to processes running on
different processors. Metis and ParMetis implement serial and distributed mul-
tilevel k-way graph partitioning algorithms [31, 32, 33, 34]. The library implements
partitions and shadows to allow an application to distribute a subdivision surface
to several processors, coordinate computations on these partitions, and then stitch
the refined partitions into a global refined surface.
1.4 Thesis Organization
The rest of the thesis is organized as follows. Chapter 2 describes in detail recursive
subdivision schemes and the difficulties in implementing them. Chapter 3 provides
an overview of the available frameworks for implementing these schemes. Chapter 4
presents the architecture of the library. Chapter 5 illustrates examples for imple-
menting subdivision schemes using the library. Chapter 6 provides computational
4
17. time of serial and distributed implementations of selected well-known subdivision
schemes. Finally, Chapter 7 concludes and suggests future work.
5
18. Chapter 2
Problem Description
This chapter describes recursive subdivision schemes in general and presents in detail
a subset of these techniques. The chapter then discusses the difficulties encountered
when implementing these schemes.
2.1 Recursive Subdivision Schemes
Recursive subdivision defines a smooth surface as the limit of a sequence of successive
refinements [1]. A recursive subdivision surface S is the pair (P 0, R) where P0 is
an initial configuration and R is a refinement procedure. The configuration consists
of a set of vertices, edges, and faces often referred to as a polyhedron even though
the faces need not have coplanar vertices.
The refinement procedure is a set of rules R that apply to a configuration to
generate a new configuration with more vertices, edges, and faces than the previous
one. At each level i of the refinement process, the polyhedron P i is the input to the
refinement rules R; its output is a new polyhedron P i+1 which becomes the input
to the next refinement step [2]. The sequence of polyhedrons P i converges at the
limit to a smooth surface if the rule set R satisfies Reif’s conditions [19].
Subdivision rules are divided into two sets: (1) refinement rules and (2) smooth-
ing rules. Refinement operators, also known as topological splits, modify the topol-
ogy of the surface by adding new vertices, possibly removing existing vertices, and
changing the topological connectivity of vertices. Smoothing operators modify the
6
19. Figure 2.1: Regular Quad Torus Mesh
geometry of the surface. They reposition new or existing vertices to achieve a
smoother surface.
Control meshes are classified as regular or irregular. Regular meshes have vertices
of equal valence number and have no boundary and crease cases. For instance,
Figure 2.1 shows a torus that consists of quad faces; all vertices are of valence four.
Irregular meshes consist of vertices that may have different valence numbers and
have boundary or crease cases. The classification of meshes as regular or irregular
is scheme dependent. Each recursive subdivision scheme has its own definition of
regular meshes. For instance, Catmull-Clark defines regular meshes to have quad
faces with valence four vertices (valence = 4 are extraordinary vertices). By com-
parison, Loop defines regular meshes to have triangular faces and vertices of valence
six (valence = 6 are extraordinary vertices).
Definition—An extraordinary vertex is a vertex whose valence is different from
the one specified by a particular subdivision scheme. For instance, a valence four
vertex is considered regular in the context of Catmull-Clark but extraordinary in
Loop.
Meshes modeling physical artifacts are often irregular. For such reasons, a re-
cursive subdivision scheme has one set of rules for regular cases and another set of
rules for irregular cases.
7
20. Scheme Elements Refinement Operator Smoothing Operator
Catmull-Clark Quads Primal Approximating
Doo-Sabin Quads Dual Approximating
Loop Triangles Primal Approximating√
3-Scheme Triangles Primal + Edge Flip Approximating
Butterfly Triangles Primal Interpolating
Kobbelt Quads Primal Interpolating
4-8 Subdivision Triangles Alternating Face-Vertex
Nasri-Hasbini Quads Ternary Approximating
Table 2.1: Classification of Some Recursive Subdivision Schemes
Subdivision schemes are classified according to the type of mesh they generate—
quadrilaterals or triangles, the refinement operators they use—face or vertex splits,
their smoothing operators—approximating or interpolating, and the smoothness and
continuity of the limit surface at regular and extraordinary vertices. Table 2.1
provides the classification of some well known recursive subdivision schemes. This
thesis uses a subset of these schemes as examples in the rest of the document. These
classification criteria are described below:
1. Quadrilateral and Triangular Meshes—recursive subdivision schemes mainly
generate two types of meshes: quadrilateral meshes and triangular meshes.
The Catmull-Clark, Doo-Sabin, and Kobbelt [13] schemes generate quad meshes
whereas the Loop, Butterfly [14],
√
3-Subdivision [15], and 4–8 Subdivision [16]
schemes produce triangular meshes.
2. Primal and Dual Splits—there are two main operators to refine a mesh. The
first operator is face split, also called primal split (Figure 2.2). This operator
splits each face of a triangular or quadrilateral mesh into four new faces. Old
vertices are retained, new vertices are inserted on the edges; for quadrilaterals
meshes, an additional vertex is inserted for each face. Figures 2.2(a) & 2.2(b)
show the application of face split on a quadrilateral and a triangular mesh
respectively. The second operator is a vertex split, also called dual split. This
operator splits each vertex into n vertices where n is the vertex’s valence. A
face is created for each face, edge, and vertex in the coarse mesh. Figure 2.2(c)
8
21. (a) face split for quads (b) face split for triangles
(c) vertex split for quads
Figure 2.2: Face and Vertex split rules.
Figure 2.3: Edge flip.
shows the application of a vertex split on a quadrilateral mesh. The two well-
known subdivision schemes that apply primal and dual split are Catmull-Clark
and Doo-Sabin respectively.
This classification does not cover all refinement operations. Several subdivision
schemes do not fit in this classification. The Butterfly and
√
3-Subdivision
schemes apply face splits to triangular faces and then use edge flips to further
modify the topology of a mesh. The edge flip operation flips the edge shared by
two adjacent triangular faces (Figure 2.3). Furthermore, a family of schemes
proposed by Zorin & Schr¨oder [8] do not fit this classification as they alternate
between primal and dual splits.
3. Interpolating and Approximating Schemes—interpolating schemes guarantee
that the original control vertices defining the surface are also vertices of the
limit surface. By contrast, approximating schemes approximate the limit sur-
face. Furthermore, approximating schemes generate surfaces of higher quality
and converge faster to their limit surfaces than interpolating schemes. The
well-known approximating schemes are Catmull-Clark, Doo-Sabin, and Loop.
9
22. Butterfly and Kobbelt are interpolating schemes.
4. Smoothness and Continuity—the smoothness of the limit surface is indicated
by the continuity at its regular and extraordinary points. In the past two
decades, several studies have been done on the behavior of subdivision schemes
around extraordinary points. Ball & Storry first stated conditions that a sub-
division must satisfy to ensure continuity of the limit surface [17, 18]. Reif
then used characteristic maps to formalize the conditions that will guarantee
C1 continuity of the limit surface at extraordinary points [19]. Peters & Reif
further developed the tools for analyzing the behavior of subdivision schemes
that generalize bi-quadratic and bi-cubic B-splines [20]. Prautzsch [21] and
Prautzsch & Reif [22] showed how to obtain higher order smoothness around
extraordinary points and further characterized Ck polynomial subdivision sur-
faces. More recent work by Zorin extends Reif’s original conditions [23] and
also proposes an alternative technique for proving C1 continuity [24]. Lastly,
Levin & Levin analyze quasi-uniform bivariate subdivision that use triangular
and quad elements on different sides of an axis [25].
The following sections present a detailed description of Catmull-Clark, Doo-
Sabin, Loop,
√
3, and Nasri-Hasbini schemes. These schemes, with the exception
of Nasri-Hasbini, are well known schemes used in the industry. The Nasri-Hasbini
is still quite new in the subdivision world. They illustrate the vast variety of sub-
division schemes as each of them presents a different set of inter-level relationships
between consecutive refinement levels. Although the Nasri-Hasbini scheme is still
new, it exhibits complex relations between elements of consecutive refinement levels.
As such, it presents a good example to show the flexibility of the library this thesis
presents.
2.1.1 Catmull-Clark Scheme
The Catmull-Clark scheme [3], developed in 1978, extends the tensor product bi-
cubic spline to generate surfaces from arbitrary topologies. The resulting surfaces
have C2 continuity everywhere except at extraordinary vertices (valence = 4) where
10
23. (a) f-Point (b) e-Point
(c) v-Point
Figure 2.4: Catmull-Clark: f -Points, e-Points, and v-Points
they are C1. Catmull-Clark is an approximation scheme and uses face split as a
refinement rule.
Given a mesh Mi, Catmull-Clark generates a denser mesh Mi+1 by computing
a new set of vertices. These vertices are later joined under a rule to form edges
and faces. The newly generated vertices are grouped into three categories: face-
points (f -Points), edge-points (e-Points), and vertex-points (v-Points). These points
correspond to the faces, edges, and vertices of mesh Mi. Figure 2.4 graphically
illustrates the creation of the faces, edges, and vertices points. f -Points are computed
first, then e-Points, and finally v-Points.
• Face points fpi+1: for each face in Mi, compute its centroid (Figure 2.4(a)).
• Edge points epi+1: for each interior edge in Mi, compute the average of the
edge’s endpoints and the f -Points of the faces on both sides to the edge (Fig-
ure 2.4b).
The edge points epi+1 of boundary or crease edges are the midpoints of the
edges (Figures 2.5a & 2.5b ).
• Vertex points vpi+1: interior vertex points are generated by relaxing the old
vertices vi in Mi according to the following formula (Figure 2.4(c)).
vpi+1
j =
(n − 2)
n
vi
j +
1
n2
n
k=1
fpi+1
k +
1
n2
n
l=1
epi+1
l
11
24. (a) e-Point of boundary edge (b) e-Point of crease edge
(c) v-Point of boundary vertex (d) v-Point of crease vertex
Figure 2.5: Catmull-Clark: Boundary & Creases
(a) Edges (b) Faces
Figure 2.6: Catmull-Clark: Edges and Faces
where
– vpi+1
j is the generated vertex point.
– vi
j is the corresponding old vertex vi+1
j .
– n is the valence of vertex vi
j.
– fpi+1
k is the f -Point of face k of vi
j at level i.
– epi+1
l is the e-Point of edge l of vi
j at level i.
The above formula applies to interior and non-crease vertices of the mesh.
The following rules generate the vertex points of corner, boundary, and crease
vertices:
– A corner vertex point vpi+1
j is an exact copy of its corresponding corner
12
25. vertex vi
j. A corner vertex by definition is a boundary vertex and is
connected to only one face.
– A boundary vertex point vpi+1
j is computed through a mask that ap-
plies to its corresponding old vertex vi
j and the opposite endpoint of the
boundary edges connected to vi
j (Figure 2.5c). The mask as shown in the
figure is as follows.
vpi+1
j =
1
8
vi
a +
6
8
vi
j +
1
8
vi
b
where vi
a and vi
b represent the boundary vertices neighboring vi
j.
– A crease vertex point vpi+1
j is computed through the same mask described
above. The mask is applied to crease edges rather than boundary edges
(Figure 2.5d). A crease vertex vi
j connected to three or more crease edges
behaves as a corner vertex. Its vertex point vpi+1
j is its own replica.
• The new edges of Mi+1 connect f -Points with e-Points and v-Points with
e-Points (Figure 2.6).
• The new faces of Mi+1 are formed from f -Points, e-Points, v-Points, and e-
Points (Figure 2.6). Each new face consists the following vertices in order:
f -Point, e-Point, v-Point, e-Point, f -Point.
Figure 2.7 shows a cube and several of its refined levels using Catmull-Clark.
Notice that the eight corner vertices of the cube are extraordinary vertices as each
has a valence of 3. Figure 2.8 shows an axe shape mesh refined several levels by
Catmull-Clark. This mesh also has of extraordinary vertices as well as crease edges
and vertices.
13
26. (a) RL 0: 8 v, 12 e, 6 f. (b) RL 1: 26 v, 48 e, 24 f.
(c) RL 2: 98 v, 192 e, 96 f. (d) RL 7: 98K v, 197K e, 98K f.
Figure 2.7: A cube mesh refined by Catmull-Clark (RL—Refinement Level).
(a) RL 0: 28 v, 54 e, 30 f. (b) RL 1: 112 v, 216 e, 108 f.
(c) RL 2: 436 v, 864 e, 432 f. (d) RL 6: 111k v, 221k e, 111k f.
Figure 2.8: An axe mesh refined by Catmull-Clark (RL—Refinement Level).
14
27. 2.1.2 Doo-Sabin Scheme
The Doo-Sabin [4], developed in 1978, generates surfaces that are biquadratric B-
spline and have C1 continuity everywhere. It is an approximation scheme and uses
vertex splits as a refinement rule.
Given a mesh Mi, Doo-Sabin generates a denser polyhedron Mi+1 by generating
a new set of faces. Theses faces are formed out of vertices computed from vertices of
Mi. Each vertex of Mi produces n new vertices, where n is the vertex’s valence. A
vertex connected to four faces produces 4 new vertices. The new faces are grouped
into three categories: face-faces (f -Faces), edge-faces (e-Faces), and vertex-faces (v-
Faces). The f -Faces are subfaces of the coarse faces, the e-Faces ride the coarse
edges, and the v-Faces ride the coarse vertices.
The following rules generate the vertices and faces of the new polyhedron.
• For each face in Mi, l new vertices, vi+1
k , k = 1, .., l are generated through
a barycentric combination of the vertices vi
k of the face. l is the number of
vertices of the face.
vi+1
k =
l
j=1
αkjvi
k
where the αkj are given by
αkk =
l + 5
4l
αkj =
3 + 2 cos
2π(k−j)
l
4l
.
Figure 2.9a shows the new vertices.
A new vertex vi+1
k that corresponds to a boundary vertex vi
k is computed by
the following formula:
vi+1
k =
3
4
vi
k +
1
4
vi
a
15
28. (a) Doo-Sabin vertices (b) Doo-Sabin vertices boundary
Figure 2.9: Doo-Sabin: regular & boundary vertices.
(a) Doo-Sabin f-Faces
(b) Doo-Sabin e-Faces
(c) Doo-Sabin v-Faces
Figure 2.10: Doo-Sabin: f -Faces, e-Faces, and v-Faces
where vi
a is another boundary vertex that is a neighbor of vi
k with respect to
the face being computed on (Figure 2.9b).
• f -Faces: each face in Mi with n vertices has n new vertices. Each new vertex
corresponds to a vertex of the original face. These n new vertices form a face
(f -Face) (Figure 2.10a).
• e-Faces: four new vertices correspond to each non-boundary edge in Mi. Two
vertices for each face in correspondence with the endpoints of the edge. These
four vertices form a face (e-Face) (Figure 2.10b).
16
29. • v-Faces: each original vertex is split into n new vertices, where n is the valence
of vi. The n vertices form a face (v-Face) (Figure 2.10c).
Figures 2.11 and 2.12 show a cube and a pentacube refined several levels using
Doo-Sabin. The pentacube naming comes as its base face is made of five vertices.
Both meshes have extraordinary vertices. Furthermore, the pentacube is made up
of triangular and quad faces. Note that the vertices and edges are replaced by their
respective v-Faces and e-Faces.
17
30. (a) RL 0: 8 v, 12 e, 6 f. (b) RL 1: 24 v, 48 e, 26 f.
(c) RL 2: 96 v, 192 e, 98 f. (d) RL 7: 98k v, 197k e, 98k f.
Figure 2.11: A cube mesh refined by Doo-Sabin (RL—Refinement Level).
(a) RL 0: 11 v, 20 e, 11 f. (b) RL 1: 40 v, 80 e, 42 f.
(c) RL 2: 160 v, 320 e, 162 f. (d) RL 7: 164k v, 328k e, 164k f.
Figure 2.12: A pentacube mesh refined by Doo-Sabin (RL—Refinement Level).
18
31. 2.1.3 Loop Scheme
The Loop scheme [5] is a triangle-based subdivision scheme developed in 1987. It
refines a triangular mesh and produces a surface that is a collection of quartic Bezier
triangles and has C2 continuity. The surface is G1 at extraordinary vertices (valence
= 6). Loop is an approximation scheme and uses face split as a refinement rule.
Given a triangular mesh Mi, Loop generates a denser mesh Mi+1 by computing
a new set of vertices. These vertices are grouped into two categories: edge-points
(e-Points) and vertex-points (v-Points).
• Edge points epi+1: for each original edge a mask is applied to its endpoints
and the remaining vertices of the two triangles sharing the edge. Let vi
1 and
vi
2 be the edge endpoints and let vi
3 and vi
4 be the remaining vertices of the
two triangles sharing the edge. The mask is as follows.
epi+1
j =
3
8
(vi
1 + vi
2) +
1
8
(vi
3 + vi
4)
Figure 2.13 shows the vertices to which the mask applies.
The Edge point epi+1 of a boundary or crease edge is the midpoint of the
edge.
• Vertex points vpi+1: interior vertex points are generated by refining the old
vertices vi in Mi through the following formula.
vi+1
j = (1 − nα)vi
j + α
n
l=1
vi
l
α =
1
n(5
8 − (3
8 + 1
4 cos 2π
n )2) n > 3
3
16 n = 3
where
– n is the valence of vi
j.
– vi
l are the 1-ring neighbors of vi
j
19
32. (a) Loop e-Point
(b) Loop Faces
Figure 2.13: Loop Subdivision scheme
The above formula is applied to interior and non-crease vertices of the mesh.
The vertex points of corner, boundary, and crease vertices are computed in
the same manner as Catmull-Clark in Section 2.1.1.
• Figure 2.13b illustrates the formation of the new triangles. Each original
triangle forms four new ones. Three triangles are connected in the order of
e-Point, v-Point, and e-Point. The fourth triangle, also referred to as f -Face,
is formed from the three e-Points of the edges of the original triangle.
Figures 2.14 and 2.15 show a triangulated cube and a gourd refined several levels
by Loop. Both meshes have several extraordinary vertices.
20
33. (a) RL 0: 8 v, 18 e, 12 f. (b) RL 1: 26 v, 72 e, 48 f.
(c) RL 2: 98 v, 288 e, 192 f. (d) RL 6: 24.5k v, 73.7k e, 49.2k f.
Figure 2.14: A triangulated cube mesh refined by Loop (RL—Refinement RL).
(a) RL 0: 326 v, 972 e, 648 f. (b) RL 1: 1.3k v, 3.8k e, 2.6k f.
(c) RL 2: 5.2k v, 15.5k e, 10.4k f. (d) RL 4: 83k v, 249k e, 166k f.
Figure 2.15: A triangulated mesh (Gourd) refined by Loop (RL—Refinement Level).
21
34. (a)
√
3 f-Points
(b)
√
3 v-Points
Figure 2.16:
√
3 Subdivision vertices
2.1.4
√
3-Subdivision Scheme
The
√
3-subdivision scheme [15] is another triangular-based subdivision scheme. The
continuity of the produced surfaces is C1 at extraordinary vertices (valence = 6) and
C2 everywhere else. The
√
3 scheme is an approximation scheme and uses face-split
and edge-flip as refinement operators.
Given a triangular mesh Mi,
√
3 generates a denser mesh Mi+1 by computing
a new set of vertices. The newly generated vertices are grouped into two categories:
face-points (f -Points) and vertex-points (v-Points).
• Face points fpi+1: for each face in Mi, compute the centroid of its vertices
(Figure 2.16(a)).
• Vertex points vpi+1: for each interior vertex vi
j in Mi, compute its correspond-
ing v-Point vi+1
j through the following formula (Figure 2.16(b)).
vpi+1
j = (1 − αn)vi
j + αn
1
n
n
l=1
vi
l
αn =
1
9
[4 − 2 cos (
2π
n
)]
22
35. PSfrag replacements v1
v2
v3
vl
vl+1
vn
vj
Figure 2.17: Vertex vj with n neighbors
(a)
√
3 edges formed from v-Points and f-Points
(b)
√
3 edges (in red) formed from f-Points.
(c)
√
3 face (in green) formed from f-Point, v-Point, and
f-Point.
Figure 2.18:
√
3 subdivision edges and faces.
– vpi+1
j is the new generated v-Point.
– vi
j is the original vertex.
– n is the valence of vi
j.
– vi
l are the 1-ring neighbors of vi
j (Figure 2.17).
• The new edges of Mi+1 are formed as follows. Connect the v-Point of each
vertex in Mi to the f -Points of faces connected to it (Figure 2.18(a)). For
each edge in Mi, flip it so it connects the f -Points of the two faces adjacent
23
36. (a) Level 0: 8 v, 18 e, 12 f. (b) Level 1: 20 v, 54 e, 36 f.
(c) Level 2: 56 v, 162 e, 108 f. (d) Level 8: 39k v, 118k e, 79k f.
Figure 2.19: A triangulated cube mesh refined by
√
3 scheme.
to it (Figure 2.18(b)).
• Figure 2.18(c) shows the formation of the faces of Mi+1. Each interior edge
in Mi forms two new faces. Let Ei be an edge in Mi, vi
1 and vi
2 its endpoints,
and Fi
1 and Fi
2 the faces connected to it. The two faces are as follows:
– Fi+1
1 : f -Point of Fi
1, f -Point of Fi
2, and v-Point of vi
1.
– Fi+1
2 : f -Point of Fi
1, f -Point of Fi
2, and v-Point of vi
2.
Figures 2.19 and 2.20 show a triangulated cube and a triangulated rook refined
several levels by the
√
3 scheme. Both meshes have extraordinary vertices.
24
37. (a) Level 0: 130 v, 384 e, 256 f. (b) Level 1: 386 v, 1.2k e, 768 f.
(c) Level 3: 3.5k v, 10.4k e, 6.9k f. (d) Level 5: 31.1k v, 93.3k e, 62.2k f.
Figure 2.20: A triangulated rook refined by
√
3 scheme.
2.1.5 Nasri-Hasbini Scheme
The Nasri-Hasbini scheme [26, 27] extends double knot insertion to produce Bi-
cubic B-spline surfaces with G2 limit continuity. The Nasri-Hasbini scheme is an
approximation scheme and uses Ternary as refinement operators.
Given a mesh Mi, Nasri-Hasbini generates a denser mesh Mi+1 as follows:
• Each vertex vi
j in Mi generates three types of vertices (Figure 2.22): (1) a new
f -Point on each face incident on vi
j; (2) a new e-Point on each edge incident
on vi
j; and (3) a new v-Point corresponding to vi
j itself. Three different masks
are applied to vi
j and its 1-ring neighbors to generate the new f -Points, e-
Points, and v-Pointsvertices. Figure 2.21 shows the masks. As one rotates
around the connected faces and edges of vi
j to compute their f -Points and
e-Points respectively, their masks also rotate with them. Note that the masks
25
38. Figure 2.21: The subdivision masks of the Nasri-Hasbini scheme on a regular mesh.
Figure 2.22: Nasri-Hasbini subdivision v-Point, e-Points, and f -Points.
Figure 2.23: Nasri-Hasbini subdivision f -Face, e-Face, and v-Face.
in Figure 2.21 apply to regular meshes only. Masks for arbitrary meshes can
be found in [26].
• Each face fi
j in Mi generates a new f -Face from the f -Points of its vertices
(Figure 2.23).
• Each edge ei
j in Mi, with two vertices v1 and v2 and shared by two faces F1
and F2, generate two new 4-sided e-Faces from the f -Points of v1 and v2 on
F1 and F2 and their corresponding e-Points on ei
j (Figure 2.23).
• Each vertex vi
j in Mi, shared by n faces fi
k and n edges ei
k, generates n 4-sided
v-Faces, each composed of the v-Point of vi
j, and f -Point of a face fi
k and the
two e-Points on the edges shared by fi
k and vi
j (Figure 2.23).
Figures 2.24 and 2.25 show the first few refinement steps of the Nasri-Hasbini
scheme on the hollow cube and skull surfaces.
26
39. Figure 2.24: A hollow cube and its first few refinements (Pictures obtained
from [26]).
Figure 2.25: A skull surface and its three refinements. (Pictures obtained from [26])
27
40. 2.2 Implementations Issues
Implementing recursive subdivision surfaces requires: (1) a representation for sur-
faces (vertices, edges, and faces) and topology along its topological operators; (2) this
representation must handle irregular meshes; (3) an infrastructure that handles
inter-level relations between consecutive refinement levels of the scheme being imple-
mented. Developers must handle the third module every time a different subdivision
scheme is implemented as it is designed and implemented to fit only the require-
ments of the scheme being considered. As a result, extensive and time-consuming
enhancements, extensions, and reimplementing the infrastructure that handles inter-
level relations is required.
Recursive subdivision surfaces are memory bound. Their memory footprint
grows exponentially with every refinement level. Typically, this factor is 4 for most
of the well-known schemes. Nevertheless, it can be as high as 9 for the Nasri-Hasbini
scheme which uses a ternary refinement operator. Distributed surfaces offer a solu-
tion around this limitation at the cost of further complicating the implementations
of such surfaces. Developers must study how to partition the mesh into submeshes
and distribute them among the processors of a cluster. Distributed surfaces are
computed by partitioning the mesh and distributing its partitions to various proces-
sors. Then each processor refines its own partition. Finally, the refined partitions
are stitched into one refined mesh.
This section discusses the difficulties of implementing recursive subdivision schemes
and the steps developers follow when attempting to implement recursive subdivision
schemes.
2.2.1 Serial Implementations
The procedure of a subdivision scheme is easy to understand and can be demon-
strated in a small number of steps. However, implementing it is not trivial specially
when considering irregular meshes. Developers intending to implement a subdivi-
sion scheme need to consider several steps: (1) implement a mesh representation
28
41. along with the operators on this data structure; (2) extend the mesh representation
or implement a separate data structure to handle the inter-level relations required
by the scheme being implemented; (3) implement a set of operators to manage this
inter-level relations; (4) generate the vertices of the next refinement step; (5) inter-
connect the new vertices to establish the topology of the new mesh.
Recursive subdivision schemes compute on meshes and geometric models. As
such, developers need to design a data structure that represents a mesh along with
its topology. Furthermore, this data structure must handle irregular meshes as most
meshes modeling objects are irregular. They have faces with different numbers of
vertices and vertices with different valence. Implementing these data structures
is time-consuming and involves managing memory as the mesh grows as well as
maintaining the correct references between the geometric elements of the mesh.
Each geometric element in the mesh must be able to refer to its incident geometric
elements. This allows efficient access to incident geometric elements. Such data
structures exist: winged-edge [38], half-edge [39], and quad-edge [40]. However,
they are not readily usable for subdivision surfaces because they do not support
inter-level relations between elements of consecutive refinement levels.
Recursive subdivision schemes generate new vertices from a given mesh. These
vertices are connected into faces under scheme dependent rules. Developers may
need to store the new vertices in temporary data structures before retrieving them
in a prescribed order to form the refined mesh. As a result, developers need to
implement functions with nested and entangled loops to handle the temporary data
structure’s elements. For instance, consider the Doo-Sabin scheme refining a level i
mesh, Mi, to level i + 1 mesh, Mi+1. To form the f -Faces, e-Faces, and v-Faces of
Mi+1, developers need to extract the created level i + 1 vertices from their data
structure through their corresponding level i elements which created them and in-
terconnect them to form the faces. This is done as follows: (1) to form an f -Face,
developers need to loop over vertices of a level i face, extract and interconnect the
level i + 1 vertices created by the level i face and its vertices; (2) to form an e-Face,
developers need to extract and interconnect the four level i + 1 vertices created by
the endpoint of a level i edge and the two level i faces connected to the edge; (3) to
29
42. Refinement-Level Vertices Edges Faces Time (secs) Size
0 288 576 288 0.00 162.1 KB
1 1,152 2,304 1,152 0.01 324.0 KB
2 4,608 9,216 4,608 0.03 1.3 MB
3 18,432 36,864 18,432 0.09 5.1 MB
4 73,728 147,456 73,728 0.42 20.2 MB
5 294,912 589,824 294,912 1.67 81.0 MB
6 1,179,648 2,359,296 1,179,648 6.68 324.0 MB
7 4,718,592 9,437,184 4,718,592 31.9 1.3 GB
Table 2.2: Catmull-Clark—run-time of torus mesh; growth factor = 4
form a v-Face, developers need to loop over the faces of a level i vertex, extract
and interconnect the level i + 1 vertices created by the vertex and the faces con-
nected to that vertex. Furthermore, the temporary data structure and the functions
handling it will be unique to the subdivision scheme they implement. Developers
will not be able to reuse them to implement other recursive subdivision schemes.
As such, developers need to navigate through the data structure that implement
the topology of the mesh and fine tune it to accommodate the requirements of the
selected recursive subdivision scheme. This process results in codes that are difficult
to read and maintain reflecting the amount of time needed by developers to reason
and implement a recursive subdivision scheme.
2.2.2 Distributed Recursive Subdivision Surfaces
Recursive subdivision schemes are memory bound. Their memory footprints grow
exponentially. Each subdivision step generates a mesh that is denser than its pre-
vious representation by a scheme dependent factor. This growth can easily over-
whelm the memory resources of any machine. It further increases the processing
time needed to compute the successive refined mesh. Tables 2.2 to 2.5 give per-
formance measurements for the successive subdivision levels of two meshes, a torus
and a cupid, with the occupied memory and execution time for the Catmull-Clark,
Doo-Sabin, and Nasri-Hasbini schemes. Figures 2.26 & 2.27 show the torus and
cupid meshes. The data presented were generated on a PC with a 3.0Ghz Intel
Pentium 4 CPU and 1.0GB of RAM.
30
43. Figure 2.26: Torus Mesh—288 v, 576 e, 288 f
Refinement-Level Vertices Edges Faces Time (secs) Size
0 6,713 14,235 7,532 0.00 3.1 MB
1 28,480 56,940 28,470 0.26 10.0 MB
2 113,890 227,760 113,880 1.31 34.8 MB
3 455,530 911,040 455,520 5.27 139.0 MB
4 1,822,090 3,644,160 1,822,080 20.98 556.1 MB
Table 2.3: Catmull-Clark—run-time of cupid mesh; growth factor = 4
Tables 2.2 & 2.5 show that recursive subdivision schemes increase exponen-
tially in memory footprint. Table 2.2 gives performance numbers for Catmull-Clark
scheme applied to the torus mesh. The torus initially occupies 162KB; after seven
refinement steps only, it occupies 1.3GB!
Tables 2.2 and 2.4 give the maximum subdivision levels that can be reached
by their corresponding subdivision scheme on the torus mesh. Furthermore, the
torus mesh is relatively small. Large meshes will either not be able to be refined,
if at all, beyond several levels because of memory limits. Tables 2.3 and 2.5 show
the successive subdivision levels of a cupid model, Figure 2.27, with the execution
time and memory reserved for the Catmull-Clark and Doo-Sabin schemes. Both
subdivision schemes could not subdivide the mesh beyond level four. Initially the
mesh occupied 3.0MB; the cupid mesh occupies 566MB after four refinement steps.
31
44. Figure 2.27: Cupid Mesh—6,713 vertices, 14,235 edges, and 7,532 faces
Distributed recursive subdivision schemes can delay hitting these limits. How-
ever, these implementations are substantially more complex than their serial coun-
terparts. Distributed subdivision consists of the following tasks: (1) partition a
mesh into several submeshes and extend each submesh with a layer of shadows; the
depth of the shadow layer depends on the scheme being parallelized; (2) distribute
the partitions to the various processors; (3) subdivide each partition on its own
processor; (4) stitch the refined partitions into a refined mesh. Figure 2.28 shows a
graphical depiction of these steps. Each of the above steps is a substantial develop-
ment task by itself. The implementation effort becomes even more substantial when
these tasks are integrated into the same system.
Definitions—A submesh consists of a set of adjacent faces; it also includes
32
45. Refinement-Level Vertices Edges Faces Time (secs) Size
0 288 576 288 0.00 162.1 KB
1 2,592 5,184 2,592 0.05 1.3 MB
2 23,328 46,656 23,328 0.36 11.4 MB
3 209,952 419,904 209,952 3.25 102.5 MB
Table 2.4: Nasri-Hasbini—run-time of torus mesh; growth factor = 9
Refinement-Level Vertices Edges Faces Time (secs) Size
0 6,713 14,235 7,532 0.00 3.1 MB
1 28,470 56,940 28,480 0.50 10.0 MB
2 113,880 227,760 113,890 3.37 34.8 MB
3 455,520 911,040 455,530 40.96 139.0 MB
4 1,822,080 3,644,160 1,822,090 1349.99 556.1 MB
Table 2.5: Doo-Sabin—run-time of cupid mesh; growth factor = 4
the vertices and edges of these faces. It further consists of an interior region and
partition boundaries. A partition boundary is a region that is shared by two or more
submeshes. Elements in the interior region are called inner elements and elements
of the partition boundary are called partition boundary elements. Figure 2.29 shows
an initial mesh A partitioned into two submeshes B and C, each having an inner
region and a partition boundary. The partition boundary elements of submeshes B
and C are identical. They are the same elements copied to both submeshes B and
C.
2.2.2.1 Mesh Partitioning
Developers have two options for partitioning a mesh into n equal submeshes. They
either implement a mesh partitioner or use an existing library, such as Metis [28],
ParMetis [29], and Jostle [30]. Designing and implementing an ideal partitioning
algorithm is known to be NP-hard. There is no ideal algorithm that cover all meshes
cases. As such, developers have to implement and experiment with several heuristic
algorithms to meet their partitioning requirements.
Existing libraries do not operate on the same data structure representing the
surface. As such, developers have to: (1) efficiently extract topological information
from the data structure representing the surface; (2) organize this information as
33
46. processors
processors
(1) Partition
& Extend
(2) Distribute
(3) Subdivide
(4) Stitch
Distributed
Subdivide
PSfrag replacements
Mi Pi
0, Pi
1, ..., Pi
n−1
Pi+1
0 , Pi+1
1 , ..., Pi+1
n−1Mi+1
Figure 2.28: Distributed Recursive Subdivision Surface
required by the library’s routine; (3) retrieve the partition information from the
routines and recast them into the surface representations. The Metis library, for
instance, requires a face adjacency graph of the mesh passed in as arrays. It returns
arrays to tell which faces should be assigned to which processors. The developers’
job is twofold: first, they must construct the face adjacency graph by looping over
the faces of the mesh and storing them in the format required Metis; second, they
must obtain the face information as outputted by Metis, package faces common to
a processor, and ship them to their corresponding processors.
2.2.2.2 Shadow Faces
Recursive subdivision schemes generate a new vertex vi+1 as the weighted sum of
the 1-ring neighbors of vertex vi. As a result, partition boundary elements can not
be refined because part of their 1-ring neighbors belong to other partitions and are
not readily accessible on the same processor (see Figure 2.29). Therefore, developers
need to use inter-process communication libraries for a processor to obtain the data
needed to refine its submesh. The exchange of dependency data takes place at every
subdivision step.
The shadow faces of a partition are the faces from adjacent partitions that are ad-
jacent to the inter-partition boundary. Figure 2.30 shows two partitioned submeshes
along with their shadow faces. Shadows represent the faces of other submeshes that
are used in the refinement of the partition’s boundary elements. Their presence de-
couples the submeshes from each other and refinement can proceed independently
from other submeshes. The extended layer of shadow faces to the submeshes elim-
inates inter-process communication between the nodes of the cluster. The shadow
34
47. Figure 2.29: Inner regions and partitions boundary of submeshes B and C
faces provide the submeshes with the essential geometric elements needed to proceed
with refinement without accessing the geometric elements of other submeshes. This
allows processors to generate refined submeshes that are then stitched together to
form a refined mesh that is equivalent to the same mesh refined serially.
2.2.2.3 Distributed Computation and Stitching of Submeshes
For the refinement of the mesh to take full advantage of distributed memory, the
computation needs to be balanced among the nodes of a cluster. Each processor in
the cluster then subdivides the submesh assigned to it.
Implementing this approach requires reorganizing the code and modifying the
data structure. The code needs to be virtually split into several parts each of
which is to be executed by a node. This can be accomplished by tagging each part
of the code with the node’s name. A possible configuration is the manager-worker
configuration. A node in the cluster is set as the central manager, called the manager
node, that manages the rest of the nodes in the cluster, the worker nodes. The code
35
48. Figure 2.30: Mesh A partitioned into submeshes B and C.
is split into two: a part designated to the manager and the other to the workers.
Furthermore, new attributes may be added to the geometric elements to keep track
of the processor they belong to and their type: whether inner, partition boundary,
or shadow elements.
Nodes in a cluster need to communicate to distribute and stitch submeshes. This
can be accomplished through the message passing library MPI [6, 7]. However, the
use of MPI requires the code to be reorganized to include MPI calls that are spread
across the code. As a result, the code becomes more difficult to read and maintain.
Furthermore, the data transfer between the various nodes must be well synchronized
to avoid deadlocks and bugs cause by mismatched communication calls.
Communications between various nodes involve the transmission of submeshes.
For these transmissions to be efficient, the submeshes need to be packed. However,
MPI is typeless. As such, the packing and unpacking of submeshes is a process that
must be handled by developers. Furthermore, developers must build MPI data types
for the geometric elements being packed. This involves defining all the element’s
attributes type and addresses.
Refined submeshes need to be stitched together to form a complete refined mesh.
The stitched mesh should not have duplicate geometric elements and the topolog-
ical connection at the partition boundary should be complete. Implementing this
functionality requires quite a bit of bookkeeping in order to: (1) generate global ids
that are consistent with other refined partitions; (2) detect elements in the refined
partitions that are generated multiple times in neighboring partitions; (3) allocate
to these duplicate elements the same global id.
36
49. Chapter 3
Background
This chapter provides an overview of the available frameworks for implementing
recursive subdivision schemes. It presents an analysis framework, a set of graph
grammar-based frameworks, and a set of mesh libraries.
3.1 Analysis Framework
In recent years, several frameworks were outlined to ease the representation and
implementation of recursive subdivision schemes. Zorin & Schr¨oder [8] describe the
construction of a unified primal and dual quadrilateral subdivision scheme. Their
demonstration is done with Doo-Sabin [4] and Catmull-Clark [3] which are a dual
and primal quadrilateral subdivision scheme respectively. Starting with a vertex
split the scheme alternates between face splits and vertex splits to generate the
required surface. They further show how quadrilateral subdivision schemes can be
implemented with a quad-tree data structures to refine the mesh in place.
3.2 Graph Grammar-Based Frameworks
Lindenmayer [9] developed L-systems to model the growth of multicellular organ-
isms. L-systems are context-sensitive string rewriting mechanisms and are described
by a formal grammar. The grammar is defined by an alphabet Σ, a set of rewriting
rules Π, and a starting string α Σ∗. These rules can be viewed as operators that
apply to a string to generate a new string that is also the input to the set of rules.
37
50. Prusinkiewicz et al. [10] extend L-systems to define parametric L-systems that
can describe recursive subdivision curves. The extension include context sensitiv-
ity, probabilistic rewriting, rule ranges, parametric and parametrized L-systems.
Parametric L-systems use compound data structures as parameters. The grammar
defines predecessor and successor vertices in a subdivision step. The L-systems rules
describe subdivision rules. These rules specify the context in which the lhs symbol,
the predecessor, is replaced by the rhs symbols, the successors. The lhs symbol
specifies one vertex; the rhs symbol specifies one or more vertices. As an example,
the following rule gives the specification of Chaikin’s subdivision scheme for closed
curves:
P(vl) < P(v) > P(vr) → P(
1
4
vl +
3
4
v)P(
3
4
v +
1
4
vr)
In this rule, v is a vertex of a closed polygonal curve, vl and vr are v’s left and right
neighbors. The predecessor in the rewriting rule, P(v), is replaced by its successors
P(1
4vl + 3
4v) and P(3
4v + 3
4vr).
Velho [11] defines Stellar Subdivision Grammars as an extension to L-system
grammars that apply to triangular meshes. Velho identifies a canonical set of re-
finement operators, labeled the stellar subdivision operators, and their inverses: face
split & face weld, vertex split & vertex weld, and edge flip (Figure 3.1). This set of
operators is sufficient to construct the various refinement operators found in subdi-
vision schemes. Velho also defines a refinement level attribute of geometric elements
and specifies how the stellar subdivision operators propagate this attribute.
Stellar subdivision grammars extend the L-system notation of rules to describe
subdivision rules that use Stellar’s operators. In this notation, a rule has the fol-
lowing form:
P(p; cond) | Q → V (v = assgn) || S
where P and V are parametric symbols. The predecessor P is replaced by the
successor V . The elements of Q, the topological context of P, are replaced by the
elements of S, the topological context of V . The parameters p and v are geometric
38
51. (a) face split and face weld (b) edge split and edge weld
(c) edge flip
Figure 3.1: Stellar Subdivision Operators & their Inverses (Reproduced from [11])
elements of the mesh. The symbol cond is a conditional expression on the refinement
level of p. The symbol assgn is a geometric assignment function that computes the
value of v.
The advantage of Stellar Subdivision Grammar is its expressive power in the rep-
resentation of the rules of recursive subdivision schemes. However, the implementa-
tion of this representation is not transparent. The system that executes these rules
has to implement the individual stellar operators: create new elements (vertices,
edges, and faces), connect these elements into the existing mesh data structures,
and remove elements no longer needed. It needs to implement a mechanism that
allows it to recognize the individual stellar subdivision operators needed from the
grammar notation used to specify the rules. The framework applies to triangular
meshes only. As such, a developer must reason about a scheme that applies to quad
meshes in terms of pairs of adjacent triangles. For example, the Doo-Sabin scheme
which applies vertex splits to quad meshes must be reformulated so it applies stel-
lar refinement operators to pairs of triangles. The interior edge split rule in this
39
52. reformulated scheme is:
E(e; l(e) < c) | F2 → V (v = avrg(N1(v)) || E4F4
A system that processes this rule must recognize that this rule applies the edge
split operator and must know how to generate and wire into the mesh the four new
edges and the four new faces that result from the edge split.
Smith, Prusinkiewicz, and Samavati [12] use graph rotation systems as a frame-
work to describe recursive subdivision schemes. Graph rotation systems are ex-
tended to handle vertex-vertex systems. Vertex-vertex systems represent a 2-manifold
mesh as a collection of vertices; each vertex has a directed list of its 1-ring neighbor-
ing vertices. They describe topological operators applied on vertex-vertex systems.
These topological operations are used in sequences of rules to describe recursive sub-
division schemes. There are three categories of topological operators: (1) query—get
the properties of a vertex, (2) selection—select one or more elements in the neighbor-
hood of a vertex, and (3) editing—modify a vertex’s properties or its neighborhood
by inserting or deleting one or more vertices from this neighborhood.
3.3 Mesh Libraries
The Computer Graphics Group, RWTH Aachen, developed OpenMesh system [36].
OpenMesh is a generic and efficient data structure for representing and manipulat-
ing polygonal meshes. Its main goal is to assist developers in representing polygonal
meshes. It is implemented in C++ and uses the half-edge data structure. The main
advantages of this data structure are: (1) it handles general polygonal mesh, (2) it
has an explicit representation of vertices, half-edges, edges, and faces, and (3) it gives
efficient access to the one-ring neighborhood of a vertex. Furthermore, the Open-
Mesh architecture allows developers to specify arbitrary traits for vertices, edges
and faces, or choose from a set of predefined attributes which are then propagated
to the mesh kernel. The kernel is responsible for the internal storage of the mesh
element and can be chosen to use either arrays or double-linked lists as container
40
53. (a) split & join facet (b) split & join vertex
(c) Flip edge (d) break & weld facet
Figure 3.2: Common Euler Operations. Reproduced from [35]
types.
The OpenMesh library does not support an infrastructure that handles inter-level
relations required to implement recursive subdivision surfaces. It only provides a
data structure for representing and manipulating meshes. As a result, implementors
of recursive subdivison surfaces still need to implement and manage temporary data
structures to store the new vertices.
Shuie & Peters [35] present new Euler-encodings for primal and dual quadri-
section refinements. Euler operators are standard atomic operations for editing
meshes. Some of these operators are: splitFacet & joinFacet, splitVertex & join-
Vertex, flipEdge, and breakFacet & weldFacet (Figure 3.2). They further argue that
their Euler encoding algorithm is more efficient than the OpenMesh library as it
minimizes the operation count and encodes updates without the need for extra data
structure, such as tagging vertices. The Euler encoding algorithm for the primal
scheme is as follows (Figure 3.3): (a) inserts a vertex (an edge-vertex) on each edge,
(b) for each face, insert an edge between two neighboring edge-vertices, (c) a vertex
is added on that edge, and (d) edges are inserted to connect all edge-vertices of
the face. For the dual quadrisection refinements, three alternative Euler encodings
are presented: factoring, splitting, and tilting. The factoring encoding decomposes
the dual refinement into two mid-edge refinements. A mid-edge refinement inserts
41
54. Figure 3.3: Euler Encoding for Primal Schemes. Reproduced from [35]
Figure 3.4: Dual Schemes: Factoring Euler Encoding. Reproduced from [35]
a vertex on each edge, connects the new vertices within a face, and then deletes the
initial vertices. Figure 3.4 depicts the factoring encoding. The splitting encoding
generates, for each vertex, new vertices corresponding to the corners of the incident
face (Figure 3.5). Both encodings, factoring and splitting, rely on temporary vertices
to refine the mesh. However, the tilting encoding avoids any intermediate vertices.
On each edge, add two vertices and connect them as shown in Figure 3.6.
Although Euler operators are effective for editing meshes, using them is time-
demanding and not straight-forward. Developers implementing a new subdivision
scheme have to reason about the operators to use and the sequence of execution
that satisfy the scheme’s specifications. This procedure is error prone. Developers
may not figure out what operators to use and their sequence of execution from
42
55. Figure 3.5: Dual Scheme: Splitting Euler Encoding. Reproduced from [35]
the first time. This maintains developers in a state of reviewing and reconfiguring
the operators execution sequence. Furthermore, Euler operators use destructive
subdivision. Refinement takes place by modifying the previous level mesh.
CGAL [37] is a toolkit developed to implement the most important of the solu-
tions and algorithms developed in computational geometry. CGAL has three main
components: the kernel, the basic library, and the support library. The kernel
defines geometric primitives such as points, vectors, lines, and operations such as
intersections and distance calculation. The Basic library is a collection of standard
data structures and geometric algorithms, such as convex hull in 2D/3D, (Delau-
nay) triangulation in 2D/3D, planar map, polyhedron, smallest enclosing circle, and
multidimensional query structures. The Support library offers interfaces to other
packages (e.g., for visualization), I/O, and other support facilities. CGAL is imple-
mented in C++ and uses the half-edge data structure as its underlying connectivity
structure.
CGAL has two approaches for implementing recursive subdivision schemes: (1) the
43
56. Figure 3.6: Dual Scheme: Tilting Euler Encoding. Reproduced from [35]
Euler operators and (2) the callback modifier mechanism. The Euler operators re-
configures the connectivity of the mesh. The modifier scheme allows programmers
to create their own combinatorial operator using the CGAL’s utilities that manip-
ulate the half-edge data structure. In addition, CGAL includes the Combinatorial
Subdivision Library (CSL). CSL contains a set of refinement functions and geometry
smoothing rules that are user-customizable. CSL is based on policy-based design.
The policy-based design (based on C++ templates) assembles a C++ class (called
host) with complex behavior out of many small and generic behaviors (called poli-
cies). Each policy defines a user-customizable interface for a specific behavior. CSL
is designed to support both generic types and generic behaviors. Implementing re-
cursive subdivision with CSL will implement the scheme refinement step as the host
function with its smoothing rules as policies.
Although CGAL provides a large number of functionalities, most of them are
directed to manipulate the half-edge data structure. Furthermore, these functions
are not abstracted from the data structure. Developers need to use a combination of
primitive functions to retrieve topological information. As a result, developers need
to either learn or be familiar with the half-edge data structure to navigate it and
retrieve topological information. In addition, implementing recursive subdivision
schemes using CGAL still requires a substantial amount of work from developers
as they need to implement and manage temporary data structures to store the new
vertices.
44
57. Chapter 4
Framework Architecture
4.1 Introduction
This chapter describes the association space abstraction which underlies a serial
and a distributed library, for implementing and using sequential and distributed
recursive subdivision surfaces. The purpose of the serial and parallel libraries is
to speedup the implementation of recursive subdivision schemes. They implement
an association space which allows a developer to establish associations between a
geometric element at a given refinement level and one or more geometric elements
at the previous refinement level. The association space decouples the generation
of the new vertices in the refined mesh from establishing the topological connec-
tivity of these vertices. The serial library uses these associations to simplify the
implementation of sequential recursive subdivision surfaces. The distributed library
extends the serial library to implement distributed recursive subdivision surfaces.
It uses associations to automate the stitching of the refined submeshes into a global
refined mesh. The rest of the chapter defines the association space abstraction and
describes the architectures of the serial and parallel libraries.
45
58. Figure 4.1: Associations for a Face & Edge Split
Figure 4.2: Associations for a Vertex Split
4.2 Association Spaces
4.2.1 Definition
An association space is a set of topological associations between two consecutive
refinement levels. A topological association relates an element (vertex, edge, or
face) at a particular refinement level to one or more elements (vertices, edges, or
faces) at the previous refinement level. The association space maps one or more
elements of the control polygon at a given refinement level onto the elements of the
control polygon at the next refinement level. Formally, Πi is an m:1 mapping from
tuples of Pi elements onto an element of Pi+1 where Pi and Pi+1 are the level i
and i + 1 control polygons respectively.
Primal subdivision schemes exhibit mostly 1:1 associations. For example, Catmull-
Clark splits a face and its edges; it associates a level i vertex, edge, or face with
its corresponding v-Point, e-Point, and f -Point at level i + 1. Figure 4.1 shows one
of each of these three 1:1 associations types. Dual subdivision schemes exhibit 2:1
associations. For example, the Doo-Sabin subdivision algorithm splits a vertex and
associates a level i vertex-face pair (a vertex and one of the faces that it belongs
to) with an f -Point at level i + 1. Figure 4.2 shows two such associations. They
associate a level i vertex and each of two of its incident faces with two level i + 1
46
59. vertices.
The association space allows a developer to store references to elements at the
next refinement level by establishing associations between these elements and ele-
ments at the current refinement level used to derive them. It then allows the devel-
oper to retrieve these references by querying the association space with elements of
the coarse level.
Using association spaces simplifies the implementation of recursive subdivision
schemes by decoupling the generation of new vertices in the refined mesh from es-
tablishing the topological connectivity of these vertices. Developers do not need to
modify a surface representation or implement additional data structures to accom-
modate the requirements of the recursive subdivision scheme being implemented.
Furthermore, associations play a key role in simplifying the implementation of dis-
tributed recursive subdivision surfaces as will be discussed later in Section 4.4.4.
4.2.2 Operations
Association spaces define the assoc function for establishing associations and re-
trieving associated elements. The function takes one or more level i elements as its
parameters. It also takes as parameter the type (V =vertex, E=edge, or F=face)
of the level i + 1 element associated with the level i elements. For notation pur-
poses, the assoc function can be used as both an l-value and an r-value. On the
right-hand side of an assignment, the function behaves as an r-value and returns
the level i + 1 element that is associated with its parameters. On the left-hand side
of an assignment, the function behaves as an l-value and associates the right-hand
side level i + 1 element to the level i elements that appear as the parameters of the
function.
The assoc function has the format assoc(elements listi, element typei+1), where
elements listi is a list of one or more level i elements and element typei+1 is the
type of the level i+1 element to be associated with elements listi or retrieved using
its association with elements listi.
Furthermore, the function accepts parameters that are level i vectors of elements
47
60. Figure 4.3: Level i pair < vi, fi > associated with level i + 1 vi+1 and ei+1
Figure 4.4: Level i pair < vi, ei > associated with level i + 1 ei+1
along with the level i+1 element type requested. The function then returns a vector
of level i + 1 elements, of the same type requested, that are associated with the
level i vectors passed as parameters. This feature allows developers to retrieve a
list of level i + 1 elements without implementing a loop that iterates over the level i
elements that correspond to the level i + 1 elements. As an example, the expression
assoc(fi, fi.vertices(), V ) retrieves a set of level i + 1 vertices where each vertex is
associated with a level i face and one of its vertex.
The element typei+1 increases the flexibility of associations between elements
of consecutive refinement levels. It removes restrictions on what type of element at
refinement level i + 1 can be associated with the elements at refinement level i. For
instance, an edge at level i + 1 can be associated with a vertex at level i; a face
at level i + 1 can be associated with a face, an edge, and a vertex at level i. This
gives the library a greater flexibility that further simplifies the implementation of
recursive subdivision schemes.
The element typei+1 also ensures the uniqueness of the association between the
level i elements and the level i + 1 element. This is crucial for retrieving associated
elements as the same set of elements, elements listi, can have several different
associations at the same time. Each association is with a different type of level i +
48
61. Figure 4.5: Level i edge ei associated with level i + 1 face fi+1
Figure 4.6: Level i pair < vi, fi > associated with level i + 1 fi+1
1 element. For example, a vertex and an edge at level i + 1 can be associated
with the same vertex-face pair at level i; the two expressions that establish these
two associations are “assoc(vi
1, fi
1, V ) ← vi+1
1 ” and “assoc(vi
1, fi
1, E) ← ei+1
1 ”.
The expression assoc(vi
1, fi
1, E) retrieves the edge ei+1
1 associated with vi
1 and fi
1.
Similarly, the expression assoc(vi
1, fi
1, V ) retrieves the vertex vi+1
1 . Figure 4.3 shows
these associations.
For an illustration of the use of associations, consider the Catmull-Clark and
Doo-Sabin schemes. For the Catmull-Clark scheme, the expression
assoc(ei, V ) ← e-Pointi+1 associates the level i + 1 vertex, e-Pointi+1, with the
level i edge, ei, which is used to derive the e-Point. By contrast, the expression
assoc(ei, V ) retrieves the level i + 1 e-Point associated with level i edge, ei. This
association is established when the level i + 1 vertex, e-Point, is created. This
level i + 1 e-Point is later retrieved to derive the two level i + 1 v-Points that
correspond to its end-points. It is also later retrieved along with other level i + 1
vertices to form the level i + 1 faces.
For the Doo-Sabin scheme, the expression assoc(vi,fi,V ) ← vf -Pointi+1 as-
sociates the level i + 1 vertex, vf -Pointi+1, with the level i vertex-face pair <
49
62. Operation Type Description Figure
1 assoc(vi, ei, E) ← ei+1 association edge ei+1 with vi & ei 4.4
2 assoc(ei, F) ← fi+1 association face fi+1 with ei 4.5
3 assoc(vi, fi, F) ← fi+1 association face fi+1 with vi & fi 4.6
4 assoc(vi, fi, ei, V ) ← vi+1 association vertex vi+1 with vi, fi,& ei 4.7
5 assoc(vi
1, vi
2, V ) ← vi+1 association vertex vi+1 with vi
1 & vi
2 4.8
6 assoc(vi, ei, E) retrieval ei+1 assoc. with vi & ei 4.4
7 assoc(ei, F) retrieval fi+1 assoc. with ei 4.5
8 assoc(vi, fi, F) retrieval fi+1 assoc. with vi & fi 4.6
9 assoc(vi, fi, ei, V ) retrieval vi+1 assoc. with vi, fi, & ei 4.7
10 assoc(vi
1, vi
2, V ) retrieval vi+1 assoc. with vi
1 & vi
2 4.8
Table 4.1: selected association and retrieval operations
Figure 4.7: Level i triplet < vi, fi, ei > associated with level i + 1 vi+1
vi, fi >. The expression assoc(vi,fi,V ) retrieves vf -Pointi+1. The expression as-
soc(vi,vi.faces(),V ) returns a vector of level i+1 vertices associated with the level i
vertex, vi, and each of its faces; the vertices in this list form the level i+1 v-Face that
corresponds to vi. These associations are established as the level i + 1 vertices, vf -
Pointsi+1, are created. The new vertices are then retrieved to inter-connect them
into the level i + 1 faces (f -Faces, e-Faces, and v-Faces) of Doo-Sabin.
Table 4.1 lists several association expressions between level i and level i + 1
elements, along with the figures that illustrate them. The first expression,
assoc(vi, ei, E) ← ei+1, associates the level i + 1 edge ei+1 with an edge and a
vertex at level i. The sixth expression, assoc(vi,ei,E), potentially retrieves the same
vertex. Similarly, the fifth expression associates a vertex vi+1 with two different
level i vertices, vi
1 and vi
2 which the tenth expression then retrieves.
50
63. Figure 4.8: Level i pair < vi
1, vi
2 > associated with level i + 1 vi+1
Figure 4.9: Abstraction levels
4.3 Sequential Library Architecture
The library consists of three layers: Geometry, Association, and Subdivision. Fig-
ure 4.9 shows the various layers in the architecture of the library.
• The Geometry layer creates and maintains the topology of the mesh. It also
implements topological utilities through which developers interact with the
geometry layer.
• The Association layer implements associations. It also implements the op-
erator, assoc, through which developers establish associations and retrieve
associated elements.
• At the Subdivision layer, recursive subdivision surfaces are implemented by
developers.
4.3.1 Geometry Layer
The Geometry layer is responsible for creating and maintaining the topology of a
mesh. It defines vertex, edge, face, and mesh objects: a vertex has three-dimensional
51
64. Cartesian coordinates; an edge has two end-points; a face has a set of vertices ori-
ented counterclockwise. The mesh is made of a set of faces, edges, and vertices. For
each object type, the library defines functions that set the topological information
associated with these objects and the attributes of these objects. The geometry
layer handles regular and irregular meshes.
Internally, the library uses arrays to define lists of vertices, edges, and faces and
manages these arrays automatically. As such, all memory management is hidden
from developers. Initially, arrays of length equal to the mesh being loaded are
allocated. Their lengths then increase by a factor of four with each subdivision level.
Furthermore, these arrays grow dynamically in length as elements are created. This
feature allows the library to load both regular and irregular meshes.
The Geometry layer provides functionality similar to that of the half-edge data
structure. The mesh is fully inter-connected. Each geometric element has access to
the elements connected to it: a vertex has access to its incident edges and faces; an
edge has access to its end-points vertices and the two faces adjacent to it; a face
has access to its vertices and edges. This allows efficient access to the geometric
elements for computation and modification.
4.3.1.1 Topological Selections
The Geometry layer is a black box from the point of view of developers. They inter-
act with it through a set of functions provided by the layer’s interface, topological
selections. These functions set and query topological information of geometric el-
ements (vertex, edge, face, and mesh). The topological functions are grouped into
four categories: creator, get & set, topology inter-connectivity, and retrieval/query.
1. Creator functions create and initialize meshes, faces, vertices, and edges. Upon
creating an object, the creater functions allocate memory space and initialize
its attributes. Creating a face, an edge, and a vertex automatically adds it to
the mesh.
2. Get & Set functions set element related values of the faces, edges, vertices,
52
65. PSfrag replacements
v1 v2
v3v4
f
Figure 4.10: Vertices of face f: < v1, v2, v3, v4 >
and mesh attributes and retrieve them. Some of these functions are:
• Given a vertex, set and retrieve its cartesian coordinates.
• Given a vertex, set and query its type. A vertex’s type is one of the
following: inner, boundary, corner, crease, or boundary-crease.
• Given a geometric element, retrieve the number of incident elements. For
instance, retrieve the number of faces connected to a vertex. Retrieve the
number of vertices composing a face.
3. Topology Inter-connectivity functions connect the geometric elements with
each other. Some of these functions are:
• Given a face, add a vertex to the face. This function adds a vertex to
the face and increments the number of vertices of the face. The function
also adds the face to the vertex.
• Given an edge, add two vertices to the edge. This function adds the two
vertices to the edge. The function also adds the edge to the vertices at
the same time.
4. Retrieval/Query functions query topological information of the mesh. Several
of these functions are:
• Given a face, select its vertices. The query returns the list of vertices of
the face in a counter-clockwise order; it does not attach any significance
to the first vertex in the list. For example, the query can return any
53
66. PSfrag replacements
f1 f2
f3f4
v
Figure 4.11: faces of vertex v: < f1, f2, f3, f4 >
PSfrag replacements
v1
v2v3
v4 v5
v6
f1 f2
Figure 4.12: Edge composed of < v1, v2 > shared by < f1, f2 >
circular permutation of the list < v1, v2, v3, v4 > as the vertices of the
face f in Figure 4.10.
• Given a vertex, select the faces it belongs to. The query returns the list
of faces in the order they were added. Considering the example of Fig-
ure 4.11, the query can return any permutation of the list < f1, f2, f3, f4 >.
• Given two faces f1 and f2, select their shared edge. The query returns
the edge that is connected to both f1 and f2 (Figure 4.12).
• Given an edge, select its vertices. The query returns the pair of vertices,
v1 and v2, that form the edge.
4.3.2 Association Layer
The Association layer implements the association space abstraction and allows de-
velopers to store references to elements at the next refinement level by establishing
associations between these elements and elements at the current refinement level. It
then allows developers to retrieve these references by querying the association space
with elements of the coarse level. The “assoc” function is the interface of this layer.
54
67. 4.3.3 Subdivision Layer
The subdivision layer allows developers to implement recursive subdivision schemes.
Developers make use of the topological functions and the association operator, as-
soc, to implement recursive subdivision surfaces. Given a mesh Mi at level i, typical
recursive subdivision schemes are implemented by a repetition of the following steps:
1. Select the elements of Mi and generate the new vertices of the refined mesh
Mi+1 in the prescribed order of the selected recursive subdivision scheme.
2. Use the assoc function to associate the new vertices with a subset of the
elements of Mi used to derive them.
3. Use the assoc function to retrieve the new vertices by querying the association
space with the elements of Mi. These new vertices must be retrieved in the
order specified by the scheme being implemented.
4. Inter-connect the new vertices to construct the faces of the new refined mesh
Mi+1.
Algorithm 4.1 illustrates the above steps through a simplified implementation of
Catmull-Clark using the library. For every face in Mi, compute its centroid, f -Point,
and associate it with its corresponding face. Note here that the assoc function
implicitly adds the associated element to Mi+1. For every edge in Mi retrieve
the f -Points of its two adjacent faces and compute its e-Point. Associate the e-
Point with its corresponding edge. Finally, for every vertex in Mi retrieve the
f -Points and e-Points of its incident faces and edges respectively. Compute its v-
Point and associate it with its corresponding vertex. Form the faces of Mi+1 by
looping over the vertices of every face and retrieve and connect the sequence of
v-Point, e-Point, f -Point, and e-Point. Figure 4.13 shows the associations used in
Catmull-Clark. Figure 4.14 shows the associations of an irregular mesh. Note the
vertex with valence 5 at level i.
The faces are formed as follows: (1) for every face fi in Mi, loop over its vertices;
(2) for every vertex vi in fi, retrieve its v-Point, the e-Points of both edges, nextEdge
55
68. Algorithm 4.1: Catmull-Clark Using Associations
input : Mi, mesh at subdivision level i
output: Mi+1, new mesh at subdivision level i + 1
// Initialize new mesh
Mi+1 ← new mesh()1
// Compute f -Points for all faces
forall fi in Mi.faces() do2
assoc(fi, V ) ← fi.centroid()3
// Compute e -Points for edges
forall ei in Mi.edges() do4
assoc(ei, V ) ← centroid(ei.org(), ei.dst(),5
assoc(ei.lface(), V ),6
assoc(ei.rface(), V ))7
// Compute v -Points for all vertices
forall vi in Mi.vertices() do8
// Retrieve faces of vertex and add their f -Points
sumFPoints ← assoc(vi.faces(), V )9
// Retrieve edges of vertex and add their e -Points
sumEPoints ← assoc(vi.edges(), V )10
assoc(vi, V ) ← n−2
n vi + 1
n2 sumFPoints + 1
n2 sumEPoints11
// Generate the new faces
forall fi in Mi.faces() do12
forall vi in fi.vertices() do13
Mi+1.add(face(assoc(vi, V ), assoc(vi.nextEdge(fi), V ),14
assoc(fi, V ), assoc(vi.prevEdge(fi), V )))15
and prevEdge, incident to it and sharing face fi, and the f -Point of fi; the function
nextEdge returns the edge following vi in fi and the function prevEdge returns the
edge prior to vi in fi; (3) connect the new vertices of Mi+1 in the counterclockwise
sequence v-Point, nextEdge’s e-Point, f -Point, and prevEdge’s e-Point to form the
new faces.
As illustrated in Algorithm 4.1, the implementation is straight forward. There is
no need for temporary data structures to store the generated vertices or for nested
loops to navigate the mesh in order to retrieve the new vertices and connect them.
It is also simple, easy to read, and therefore easy to maintain.
56
69. (a) f -Points: <v:f>
associations.
(b) e-Points: <v:e>
associations.
(c) v-Points: <v:v>
associations.
Figure 4.13: Associations of Catmull-Clark.
Figure 4.14: Association of an extraordinary vertex for Catmull-Clark
Figure 4.15 shows a T-shaped mesh refined several levels by Catmull-Clark. The
mesh is irregular as it consists of extraordinary vertices and faces with different
number of vertices. Furthermore, some of its edges and vertices are set as creases.
The sharp features at the top corners of the model in Figure 4.15d are the refined
crease edges and vertices.
To further show the flexibility of the library, the following explains how the three
stellar operators, face splits, vertex splits, and edge flips are implemented using the
library.
• Face Split—a face split inserts a new vertex into a face; this new vertex is
often generated from an affine combination of the face’s vertices. It also inserts
new vertices on the face’s edges. The new vertices are used to build the faces
of the refined level.
Figure 4.16 shows how associations handle the face split. The associations are
57