morphing between geometric shapes using straight …barequet/theses/yakersberg-msc-thesis.pdf ·...

99
MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT-SKELETON-BASED INTERPOLATION EVGENY YAKERSBERG

Upload: others

Post on 05-Jul-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

MORPHING BETWEEN GEOMETRIC

SHAPES USING

STRAIGHT-SKELETON-BASED

INTERPOLATION

EVGENY YAKERSBERG

Page 2: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique
Page 3: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

MORPHING BETWEEN GEOMETRIC SHAPES

USING STRAIGHT-SKELETON-BASED

INTERPOLATION

RESEARCH THESIS

SUBMITTED IN PARTIAL FULFILLMENT OF THE

REQUIREMENTS

FOR THE DEGREE OF MASTER OF SCIENCE

IN COMPUTER SCIENCES

EVGENY YAKERSBERG

SUBMITTED TO THE SENATE OF THE TECHNION — ISRAEL INSTITUTE OF TECHNOLOGY

IYAR, 5764 HAIFA MAY, 2004

Page 4: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique
Page 5: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

THIS RESEARCH THESIS WAS SUPERVISED BY DR. GILL BAREQUET

UNDER THE AUSPICES OF THE COMPUTER SCIENCES DEPARTMENT

THE GENEROUS FINANCIAL HELP OF THE TECHNION IS GRATEFULLY

ACKNOWLEDGED

Page 6: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique
Page 7: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

Contents

Abstract xi

1 Introduction 1

1.1 Morphing and Shape Blending . . . . . . . . . . . . . . . . . . . . . 1

1.2 Surface Reconstruction from Parallel Cross Sections . . . . . . . . . 2

1.3 Straight Skeleton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.4 Straight-Skeleton-Based Interpolation . . . . . . . . . . . . . . . . . 5

1.5 2D Morphing using an Interpolated Surface . . . . . . . . . . . . . . 6

1.6 Organization of the Thesis . . . . . . . . . . . . . . . . . . . . . . . 7

2 Theoretical and Practical Issues of Computing Straight Skeletons 9

2.1 Straight Skeleton Computation . . . . . . . . . . . . . . . . . . . . . 9

2.1.1 The algorithm of Felkel-Obdrzalek . . . . . . . . . . . . . . . 10

2.1.2 Correctness of the algorithm . . . . . . . . . . . . . . . . . . 11

2.2 Triangulating Straight-Skeleton Faces . . . . . . . . . . . . . . . . . 16

2.2.1 Geometric properties of straight-skeleton faces . . . . . . . . 17

2.2.2 Addition of Steiner points and visibility . . . . . . . . . . . . 23

v

Page 8: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CONTENTS

2.2.3 Triangulation algorithm . . . . . . . . . . . . . . . . . . . . . 28

3 Subdivision 33

3.1 Smoothness and Subdivision . . . . . . . . . . . . . . . . . . . . . . 33

3.2 Metric Average . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

3.3 Straight Skeleton Average . . . . . . . . . . . . . . . . . . . . . . . . 35

3.4 The Subdivision Scheme . . . . . . . . . . . . . . . . . . . . . . . . . 40

4 Experimental Results 49

4.1 Straight-Skeleton-Based Interpolation . . . . . . . . . . . . . . . . . 49

4.2 Subdivision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

4.3 Morphing Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

5 Conclusion 63

References 65

Hebrew Abstract `i

vi

Page 9: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

List of Figures

1.1 Edge and split events of straight skeleton . . . . . . . . . . . . . . . . 5

2.1 A problematic input for the algorithm of Felkel and Obdrzalek . . . . 11

2.2 Processing the first three events . . . . . . . . . . . . . . . . . . . . . 14

2.3 A failure of the algorithm . . . . . . . . . . . . . . . . . . . . . . . . 15

2.4 A problematic skeleton face . . . . . . . . . . . . . . . . . . . . . . . 16

2.5 A straight-skeleton face . . . . . . . . . . . . . . . . . . . . . . . . . . 18

2.6 Two cases of the angle ∠v0v1v2 . . . . . . . . . . . . . . . . . . . . . 19

2.7 Contradiction to the monotonicity of the face . . . . . . . . . . . . . 19

2.8 Assumption for the second case of ∠v0v1v2 . . . . . . . . . . . . . . . 20

2.9 Split event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

2.10 Edge event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

2.11 A schematic view of a straight-skeleton face . . . . . . . . . . . . . . 23

2.12 A Steiner point for a right wing vertex . . . . . . . . . . . . . . . . . 25

2.13 A Steiner point for an intermediate vertex . . . . . . . . . . . . . . . 25

2.14 Visibility of the right wing vertices . . . . . . . . . . . . . . . . . . . 26

2.15 RightCut for visible vertices . . . . . . . . . . . . . . . . . . . . . . . 29

vii

Page 10: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

LIST OF FIGURES

2.16 RightCut for an invisible right wing vertex . . . . . . . . . . . . . . . 30

2.17 RightCut for an invisible intermediate vertex . . . . . . . . . . . . . . 30

3.1 The straight skeleton average of two contours . . . . . . . . . . . . . 36

3.2 Avoiding degenerate contours . . . . . . . . . . . . . . . . . . . . . . 37

3.3 Expansion of the contour . . . . . . . . . . . . . . . . . . . . . . . . . 38

3.4 One iteration of the subdivision scheme . . . . . . . . . . . . . . . . . 41

4.1 Addition of Steiner points . . . . . . . . . . . . . . . . . . . . . . . . 50

4.2 Reconstruction of internal human organs . . . . . . . . . . . . . . . . 51

4.3 Reconstruction of a human head . . . . . . . . . . . . . . . . . . . . . 52

4.4 Multiple ovals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

4.5 The smoothing effect of the subdivision (Sample 1) . . . . . . . . . . 55

4.6 Subdivision scheme applied to Sample 2 . . . . . . . . . . . . . . . . 56

4.7 Subdivision scheme applied to Sample 3 . . . . . . . . . . . . . . . . 56

4.8 Convergence of the scheme for synthetic inputs, Hausdorff metric . . 58

4.9 Subdivision scheme applied on a medical sample . . . . . . . . . . . . 59

4.10 Convergence of the scheme for a medical input, Hausdorff metric . . . 61

viii

Page 11: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

List of Tables

4.1 Summary of interpolation statistics . . . . . . . . . . . . . . . . . . . 52

4.2 Subdivision scheme applied on synthetic samples . . . . . . . . . . . . 57

4.3 Subdivision scheme applied on a medical sample . . . . . . . . . . . . 60

ix

Page 12: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique
Page 13: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

Abstract

In this thesis we design and implement a 2-dimensional morphing technique between

polygonal shapes, based on a 3-dimensional surface interpolation between them. A

shape may consist of several non-intersecting contours (each one is a simple polygon),

possibly nested within each other. A major challenge of this problem is morphing

between shapes having different geometries and topologies. Our approach involves

surface reconstruction (or interpolation) between the source and target shapes, and

then extraction of intermediate slices. This is accomplished by slicing the solid object

bounded from below and above by the original shapes embedded in parallel planes,

and by the interpolated surface between the two planes. Using a dense-enough series

of intermediate planes, the resulting sequence of slices can be used for visualizing the

morphing between the original shapes. Our approach is naturally extended to the

general case of n parallel polygonal shapes, for n > 2.

The solid objects constructed by the interpolation often have irregular bound-

aries and sharp dihedral angles between faces. This is not always suitable for the

reconstructed object, and it often creates disappointing artifacts in the morphing

process. We propose a subdivision smoothing scheme, which is adopted from a spline

xi

Page 14: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

ABSTRACT

subdivision scheme. In order to make this scheme operate on a set of 2D paral-

lel cross-sections, we define the straight skeleton average, and base the subdivision

scheme on this average.

xii

Page 15: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

Chapter 1Introduction

1.1 Morphing and Shape Blending

Special effects in movies have always captured our imagination, but morphing has

always seemed to attract special attention. The term morphing comes from the

Greek word metamorphosis, which means shape change. The goal of morphing is to

gradually transform one shape (the source) into another (the target). Some recent

papers (e.g., [AM99]) propose even more generalized approach: morphing among

multiple objects (that is, between multi-component objects). The morphing process

varies, depending on whether the shapes are 2D or 3D. A classical example of the

2D case is image morphing. Numerous morphing schemes were developed for this

problem (such as mesh morphing, field morphing, energy minimization, etc. [Wol98]),

but the mesh morphing is obviously the most popular.

In this research we focus our attention on a special case of the 2D problem:

morphing between polygonal shapes. A shape may consist of several non-intersecting

contours (each one is a simple polygon), possibly nested within each other, thus

1

Page 16: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 1. INTRODUCTION

creating material and nonmaterial areas (holes). The major challenge of this problem

is morphing between shapes having different geometries and topologies. In this case

the mesh morphing can be extremely tricky and may require user intervention. Our

approach involves surface reconstruction (or interpolation) between the source and

target shapes, and then extraction of intermediate slices.

1.2 Surface Reconstruction from Parallel Cross Sec-

tions

Keppel [Ke75] set the first milestone in approximation of complex surfaces. This work

introduced an algorithm for constructing a surface between two polygons contained in

parallel planes by triangulating between the contour lines. The optimal triangulation

(according to some merit function) is found by using classical methods of graph

theory. The main drawback of this algorithm is that it cannot handle the general

case of objects with multiple contours in a single plane. It also implicitly assumes a

high degree of resemblance between the contours.

To eliminate this drawback Boissonat [Bo88] proposed an algorithm based on the

3D Delaunay triangulation (see, e.g., [BKOS00, §9]) of the vertices of the polygons in

the two planes. The surface of the polyhedron formed by the union of tetrahedra is the

desired surface. He reduces the problem of tetrahedralization of the object delimited

by the two slices into building tetrahedra from two 2D Delaunay triangulations of

two adjacent slices. Considerable differences in geometries of the slices or holes inside

material areas present serious difficulties for the algorithm. The running time of the

algorithm is O(n log n + k), where n is the size of the input and k is the size of the

output.

2

Page 17: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 1. INTRODUCTION

Another approach for handling all branching situations and hierarchical structures

was suggested by Barequet and Sharir [BS96]. They used Geometric-Hashing-based

2D curve matching to find corresponding portions of contours, applying arc-length

discretization. Then, these portions were stitched together by adding connecting

triangles. The remaining contour edges were combined into spatial 3D cycles, so-

called clefts. After eliminating possible holes (using a system of straight line-segment

‘bridges’), the resulting clefts were triangulated by a 3D minimum-area triangulation

technique. The drawback of this algorithm is the possibility of creating horizontal

triangles in the output (created in the last step) when the input slices have significant

dissimilarities. It was proposed in [BS96] either to remove horizontal triangles which

are generated twice (in successive pairs of slices) or prefer slanted triangles in the

process of triangulating the clefts. The practical running time of the algorithm is

O((k + ξ) log(k + ξ) + n + ξh3) in average, where k is the total complexity of the

input slices, n is the complexity after the discretization step, ξ is the number of clefts,

and h is the complexity of the biggest cleft.

The approach of Bajaj et al. [BCL96] is similar to that of [BS96], though it

attempts to formalize the constraints imposed on the reconstructed surface. These

constraints and the formulation of the reconstruction rules provide the theoretical

foundations for the approach. The time complexity of their algorithm is O(n log n)

in the average case and O(n2 log n) in the worst case, where n is the size of the input.

More recent works [OPC96,FO99,BGLS03] use a novel type of polygonal skeleton,

so-called the straight skeleton, to reconstruct surface between shapes with multiple

contours. Our research is based on the algorithm of [BGLS03]. In Section 1.3 we give

the definition of the straight skeleton and some of its geometric properties. Section

1.4 presents an overview of the reconstruction algorithm.

3

Page 18: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 1. INTRODUCTION

1.3 Straight Skeleton

The straight skeleton, introduced in [AAAG95], is a relative of the well-known no-

tion of medial axis. These two structures are identical for convex polygons, but are

significantly different for nonconvex polygons. The straight skeleton of a polygon

P is defined by a shrinking process. Imagine that the boundary of P is contracted

towards its interior in a self-parallel manner and at the same speed for all edges. The

lengths of edges may decrease or increase in this process. Each vertex of P moves

along the angular bisector of its incident edges until the boundary does not change

topologically. There are two possible type of changes:

• Edge event: an edge shrinks to a point, making its neighboring edges adjacent.

• Split event: an edge is split since an opposite reflex vertex runs into it, splitting

the polygon into two portions. New adjacencies between the split edge and the

two edges incident to the reflex vertex are created.

After either type of event we are left with one or two polygons which continue

to shrink further if they have a non-zero area. Certain events will always occur

simultaneously, even if the vertices of P are in general position, when three edge

events make a triangle collapse into a point. The shrinking process yields a hierarchy

of nested polygons, which we also call polygonal bases. Figure 1.1 shows these two

types of events. The reflex vertex v3 runs into the edge v0v1, splitting it into two and

creating the skeleton vertex u1. Edges v0v4 and v1v2 shrink to zero at the vertices

u2 and u3, respectively.

The straight skeleton, S(P), is defined as the union of the pieces of angular bisec-

tors traced out by polygon vertices during the shrinking process. S(P) is a unique

structure defining a polygonal partition of P. Each edge e of P sweeps out a certain

4

Page 19: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 1. INTRODUCTION

v2

v0 v1

v3

u3

u1u2

v4

Figure 1.1: Edge and split events of straight skeleton

area which we call the face of e. It is known that S(P) is a tree, and it consists of

exactly n connected faces, n − 2 vertices (in addition to the original vertices of P),

and 2n − 3 straight edges, where n is the complexity of the polygon P (Lemma 1

of [AAAG95]).

1.4 Straight-Skeleton-Based Interpolation

The interpolation algorithm of [BGLS03] makes no prior assumption about the input.

It operates on any type and number of contours, and handles all branching situations

and hierarchical structures. This algorithm consists of three major steps:

• Orienting the contours in each slice in consistent directions;

• Computing the overlay of the two slices; and

• Interpolating a surface between the two slices.

5

Page 20: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 1. INTRODUCTION

The first step is needed for correctly defining material and nonmaterial regions in

the two slices. The second step computes the symmetric difference of the two slices.

(That is, for slices A and B, it computes the cells of (A\B) ∪ (B\A); these are

called the “active cells.”) The third step is apparently the heart of the algorithm: it

consists of computing the straight skeletons of the active cells, triangulating the cells

based on the skeletons, and then lifting up the triangulation to three dimensions and

constructing the surface. Using the straight skeletons of the symmetric difference

between the shapes is a key ingredient to obtain a smooth interpolation between

them.

1.5 2D Morphing using an Interpolated Surface

We base our proposed method for 2-dimensional morphing between two shapes on

the 3-dimensional interpolation between them. This is accomplished by slicing the

solid object bounded from below and above by the two original shapes, and by the

surface interpolated between them. The slicing operation amounts to computing the

intersections of this solid model with a series of parallel planes positioned (usually

equally spaced) between the two planes supporting the original shapes. Using a dense-

enough series of intermediate planes, the resulting sequence of slices can be used for

visualizing the morphing between the original shapes.

6

Page 21: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 1. INTRODUCTION

1.6 Organization of the Thesis

Chapter 2 is devoted to theoretical and practical issues of straight-skeleton-based

interpolation. In Section 2.1 we investigate the correctness of the algorithm for com-

puting straight skeletons and fix a serious flaw that can hamper the computations.

Section 2.2 engages in triangulation of the faces induced by straight skeleton.

In Chapter 3 we define the straight skeleton average, based on the straight-

skeleton-based interpolation. We use this average to develop a subdivision scheme

intended for smoothing the interpolated surfaces.

Chapter 4 presents the experimental results obtained using the software developed

as a part of this thesis.

7

Page 22: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique
Page 23: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

Chapter 2Theoretical and Practical Issues of

Computing Straight Skeletons

2.1 Straight Skeleton Computation

All of the known techniques for computing straight skeletons are based on a simulation

of the polygon shrinking process, first proposed in [AAAG95]. Although the medial

axis can be constructed in linear time [CSW95], the fastest known algorithms for

straight skeletons are much slower. The main difficulty is that changing the position

or angle of a reflex vertex has a significant nonlocal effect on the skeleton. This

nonlocality makes techniques such as incremental construction or divide-and-conquer

fail. Felkel and Obdrzalek [FO98] present an O(n(r+ log n))-time algorithm, where n

is the complexity of the polygon and r is the number of reflex vertices. The best known

method for computing the straight skeleton is due to Eppstein and Erickson [EE99];

it runs in O(n1+ε + n8/11+εr9/11+ε) time, for every ε > 0.

We use the algorithm of Felkel and Obdrzalek for straight skeleton computation.

9

Page 24: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

It is much simpler than other algorithms, yet it is fast enough, especially if the inputs

contain relatively few reflex vertices, in which case the algorithm runs in near-linear

time. Its general description is found in the following section. However, it contains a

serious flaw, which can lead to erroneous results (and even hamper the computation).

This problem is considered and fixed in Section 2.1.2.

2.1.1 The algorithm of Felkel-Obdrzalek

The algorithm applies the principle of the roof construction by sweeping, but instead

of constructing the polygonal base in the cross sections, it maintains only the pointers

to the edges of the original polygon. The basic data structure used by the algorithm is

a set of circular lists of active vertices (SLAV). This structure stores cycles of vertices

for the outer boundary and for all holes and subpolygons created during the straight

skeleton computation. In case the polygon is convex, the SLAV always contains only

one list (LAV). In case of a simple nonconvex polygon, it stores a list for every sub-

polygon (created during the shrinking process); and in case the polygon has holes,

the algorithm maintains such a list for each hole.

The initialization phase of the algorithm comprises the creation of the circular

lists (one for the outer polygon boundary and one for every hole) and the events

priority queue. Initially, it stores the events induced by the original polygon vertices.

This queue is global and contains two types of events: edge and split. The priority

keys are the offset distance of the events, that is, the amount of offset needed to

reach the events. During the computation, the events are fetched from the top of

the queue. Processing of an event can include the alteration of the SLAV, creation

of new vertices, and addition of new events. The queue can also contain outdated

10

Page 25: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

af

g

e

d

b

c

Figure 2.1: A problematic input for the algorithm of Felkel and Obdrzalek

events (induced by already vanished vertices), which should not be processed. The

computation ends when the priority queue becomes empty.

Algorithm 1 shows a brief and simplified overview of the algorithm of Felkel-

Obdrzalek. For a detailed definition of the algorithm, the reader is referred to [FO98].

2.1.2 Correctness of the algorithm

The algorithm of Felkel and Obdrzalek does not construct the polygonal base in the

cross sections. This property significantly improves the time complexity, yet, at the

same time, requires special care while dealing with the event queue. We found that

the algorithm works correctly in most cases, however for some situations it reports

erroneous results.

As an example, we consider a nonconvex polygon P consisting of seven vertices. 1

The polygon and its straight skeleton are shown in Figure 2.1. Although P contains

several reflex vertices (b, c, e, and f), these vertices do not necessarily induce split

1The symmetry of the polygon is not important for this example. The vertices a, b, and c canbe freely moved (to some extent) without changing the character of the computations.

11

Page 26: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

Algorithm 1: Computation of the straight skeleton

Initialize the SLAV;Initialize the event priority queue Q;while Q is not empty do

e ←− top(Q);if e is outdated then continue;if e is a concurrent vanishing of three edges then

Create three straight skeleton segments;Remove e.LAV from SLAV;

else if e is an edge event thenCreate two straight skeleton segments;Remove two vertices e.va and e.vb (which induce the event) from e.LAV;Create a new vertex v ′ (at the location of e);Add v ′ to e.LAV;

➀ Compute an event e ′ for the vertex v ′;Add e ′ to Q;

else/* e is a split event */Create one straight skeleton segment;Remove the reflex vertex e.v (which induces the event) from e.LAV;Create two duplicate vertices v ′1 and v ′2 at the location of e;Set fopp:=opposite edge of e.v;if e.LAV = fopp.LAV then

Remove e.LAV from SLAV;Split e.LAV into two new LAVs and add them to SLAV;

elseRemove e.LAV and fopp.LAV from SLAV;Merge e.LAV and fopp.LAV into a new LAV and store it in SLAV;

endif➁ Compute events e ′1 and e ′2 for the vertices v ′1 and v ′2;

Add e ′1 and e ′2 to Q;endif

endwhile

12

Page 27: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

events. Figure 2.2 shows the processing of the first three events of the algorithm, which

are three edge events. The skeleton vertices created for these events are denoted by

v1, v2, and v3. The figure also shows (with dashed lines) the polygonal bases in the

cross sections. The results of these iterations are consistent with the straight skeleton

depicted in Figure 2.1, in contrast with the fourth iteration, which produces an error.

Figure 2.3(a) illustrates the correct progress of the computations, creating the

vertex v4 for the edge event e4, that is induced by the vertices v1 and e. The

algorithm, however, takes a wrong turn and creates the vertex for another event,

induced by the vertices v3 and v1 (see Figure 2.3(b)). At this point the construction

is no more consistent with the straight skeleton.

Why doesn’t the algorithm pick the correct event (in our case, induced by the

vertices v1 and e) from the queue? The answer is extremely simple. Because the

queue does not hold this event! Indeed, this edge event can only be stored in the

priority queue during the first iteration (in the line marked by ➀ of Algorithm 1). At

that moment of the computation, the intersection of the bisectors emanating from a

and v1 is at offset distance (from P) which is smaller than that of the intersection of

the bisectors emanating from v1 and e. Therefore, a and v1 induce the wrong event

stored in the queue.

To fix this flaw, we extended the lines marked by ➀ and ➁ of Algorithm 1 as

follows: Instead of only computing the events for the newly created vertices, we

compute events for their adjacent vertices (in the corresponding LAVs) as well. This

modification does not slow down the algorithm significantly (asymptotically it has no

effect), and it resolves the problem of missed events.

13

Page 28: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

v1

ga

e

d

b

c

f

(a) First edge event (v1)

v2

av1

e

d

b

c

fg

(b) Second edge event (v2)

v2

v3

v1

e

d

b

c

fga

(c) Third edge event (v3)

Figure 2.2: Processing the first three events

14

Page 29: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

v2

v4

v1

e

d

b

c

fga

v3

(a) Correct construction

v4

v1v2

e

d

b

c

fga

v3

(b) Incorrect construction by the algorithm

Figure 2.3: A failure of the algorithm

15

Page 30: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

ab c

d

e fg

F

Figure 2.4: A problematic skeleton face

2.2 Triangulating Straight-Skeleton Faces

One of the necessary steps to construct the interpolated surface is to triangulate the

faces induced by the straight skeleton. The presence of “horizontal” triangles (all

vertices of such triangle are internal nodes of the skeleton with the same height)

could severely damage the intuitiveness of the surface and its quality. Moreover,

these triangles complicate the morphing process because we attempt to slice them

by a horizontal plane. There are even cases where every conventional triangulation

produces this kind of triangles. Figure 2.4 shows (with dashed lines) the straight

skeleton of a polygon. (Assume that the two chains ag belong to two successive

slices.) Since only the vertices c and e are visible to the vertex d, every triangulation

of the face F includes the horizontal triangle ∆cde (since all of c, d, and e have height

0.5).

Our goal is to find a triangulation which produces triangles with at least one

16

Page 31: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

vertex on the polygon boundary or skeleton segments emanating from the boundary

nodes. However, as seen in the above example (face F in Figure 2.4), this is not

always possible: no triangulation of F contains a triangle one of whose edges is either

ad or gd. Therefore, in order to connect every vertex to the defining polygon edge

or a skeleton segment we might need additional (Steiner) vertices along that edge

or segment. In the following section we shall prove some geometric properties of

straight-skeleton cells which allow simple and fast addition of Steiner points.

2.2.1 Geometric properties of straight-skeleton faces

Some of the basic properties of straight skeletons can be found in [AAAG95]. We

shall use the monotonicity property of straight skeleton faces, which is given by the

following theorem:

Theorem 1 [AAAG95, Lemma 3, p. 756] Each face f(e) of a straight skeleton is

monotone with respect to its defining edge e. That is, the intersection of f(e) with

any line orthogonal to e is connected (a point or a segment).

Theorem 2 Let f(e) be a straight-skeleton face and e = (v0, v1) its defining polygon

edge. Let vk and v2 be adjacent to v0 and v1, respectively, along the boundary of

f(e). Let v` and vr be the leftmost and rightmost vertices, respectively, of the face

with respect to the direction of the line supporting e (Figure 2.5). Then:

1. v` ∈ {vk, v0}; and

2. vr ∈ {v1, v2}.

Proof. We provide the proof for vr only; the proof for v` is similar. There are two

possible cases: ∠v0v1v2 < π2

and ∠v0v1v2 > π2. (Since v1v2 is an angular bisector,

17

Page 32: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

v2(= vr)

e v1

vk

f(e)

v0(= v`)

Figure 2.5: A straight-skeleton face

we do not consider the degenerate case of ∠v0v1v2 = π2.) These cases are shown in

Figure 2.6.

1. ∠v0v1v2 < π2:

Assume for contradiction that there exists a vertex vi on the face’s boundary

such that its projection v∗i onto e is the rightmost (Figure 2.7). Thus, the

normal v∗2v2 intersects the face f(e) in at least three different points (v2, v∗2,

and vj), therefore f(e) is not monotone with respect to e, which contradicts

Theorem 1.

2. ∠v0v1v2 > π2:

Let α be the angle between the lines supporting the edges e and v3v2. Assume

for contradiction that α ≥ π2

(Figure 2.8). The vertex v3 is an internal node of

the straight skeleton, therefore, it can be created either by an edge event or by

a split event.

(a) Split event (Figure 2.9). Let b be the opposite edge that is split in the

event v2 by the sliding vertex v1. It can be either an original edge of the

polygon boundary or, perhaps, an edge that was already split by some split

event. Let φ be the angle between e and b. Obviously, φ ≤ π, therefore,

18

Page 33: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

v2

v0 e v1

vk

(a) ∠v0v1v2 < π2

v2

v0 e v1

vk

(b) ∠v0v1v2 > π2

Figure 2.6: Two cases of the angle ∠v0v1v2

v∗iv0 e v1

vkv2

vi

v∗2

vj

Figure 2.7: Contradiction to the monotonicity of the face

19

Page 34: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

v3

v0 e v1

vk

α

u1

v2

Figure 2.8: Assumption for the second case of ∠v0v1v2

v3

v0 e v1

g

b

g ′

e ′

b ′

α

φ

u1

v2

Figure 2.9: Split event

20

Page 35: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

u0

v0 e v1

v2

u1

(a) Intersection of v0v2 and v1v2

γe

g

e ′η

h

ζu1

u2

v2

v3

v0

δ

β

θv1

(b) Intersection of u1v2 and v1v2

Figure 2.10: Edge event

α = 12φ ≤ π

2. However, b cannot be the opposite edge of v1 if φ = π.

Hence, α < π2, which is a contradiction to our assumption.

(b) Edge event (Figure 2.10). The vertex v2 is created by the intersection

of the angle bisector v1 and one of the angle bisectors of the neighboring

boundary vertices: either of v0 or u1 (these vertices can be either created

by some previous events during the shrinking process, or original polygon

vertices).

21

Page 36: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

Let us assume first that v2 is the intersection of the angle bisectors v0v2

and v1v2 (Figure 2.10(a)). Thus, v2 is the vanishing point of the edge e

and the skeleton face boundary is of the form v1v2v0 . . . , therefore α =

∠v2v0v1 < π2, which is a contradiction to our assumption. Let then v2 be

the intersection point of the angle bisectors u1v2 and v1v2 (Figure 2.10(b)).

Let e ′ be the line parallel to the edge e and passing through the vertex u1.

We have

β + γ + θ = 2π; (2.1)

η + θ = π. (2.2)

By subtracting (2.2) from (2.1), we get

β + γ − η = π. (2.3)

The vertex v2 is the vanishing point of the edge g, hence the segment

v2v3 of the boundary of the skeleton face f(e) is the bisector of the angle

between the edges e and h. Together with the assumption α ≥ π2

we get

δ + ζ + η ≥ π. (2.4)

The summation of Equations (2.3) and (2.4) yields

β + γ + δ + ζ ≥ 2π. (2.5)

Since both v1v2 and u1v2 are angle bisectors, β = γ and δ = ζ, so we can

simplify Equation(2.5) to obtain

γ + δ ≥ π. (2.6)

However, γ and δ are internal angles of the triangle ∆u1v1v2, therefore

γ + δ < π, which contradicts (2.6). ¥

22

Page 37: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

vj+1

f(e)

ev0 v1

v2vi+1

vi+3

v3v5vi

vj

vj+2

vi+2

vk−2

vk−3

vk−4

vk−1v4

vj+3

Figure 2.11: A schematic view of a straight-skeleton face

2.2.2 Addition of Steiner points and visibility

Figure 2.11 shows a schematic view of the straight skeleton face f(e) consisting of

k boundary vertices. Vertices v0 and v1 are vertices of the original polygon, while

all the other vertices are internal to the straight skeleton. We classify the vertices

v2, . . . , vk−1 by their projections onto the line `(e) (that supports the edge e) and

divide them into three sets: left wing, right wing, and intermediate vertices. Projec-

tions of the vertices from the left wing lie to the left of v0. In Figure 2.11 these are

the vertices vj+3, . . . , vk−1. Similarly, all the vertices that lie to the right of v1 with

respect to their projections onto `(e) belong to the right wing (v2, . . . , vi+1 in Figure

2.11). The remaining vertices (vi+2, . . . , vj+2) belong to the intermediate set. The

wings of a face or the intermediate set may be empty (for instance, consider the face F

in Figure 2.4), yet there always exists at least one vertex in addition to v0, v1 (which

is the case in the simplest possible face: a triangle).

As stated in the beginning of this section, our goal is to find a triangulation in

which every triangle has at least one vertex on the polygon boundary or skeleton

23

Page 38: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

segments. Therefore, we attempt to triangulate the straight skeleton faces in the

following manner:

• Connect v0 with all the vertices of the left wing;

• Connect v1 with all the vertices of the right wing; and

• Connect the remaining intermediate vertices with either v0 or v1 according to

their proximity.

However, we are not always able to triangulate in this way since some of the boundary

vertices can be invisible from both vertices v0 and v1. It is illegal to connect such

vertices directly to v0 or v1, because this would construct invalid diagonals. We use

additional (Steiner) points to overcome this pitfall. We drop a perpendicular from

an invisible vertex to the line `(e) to determine the location of the Steiner point.

Theorem 2 ensures that the perpendicular can intersect either the straight skeleton

segments vk−1v0 or v1v2 (if the invisible vertex belongs to the left or right wings,

respectively), or the polygon edge e = v0v1. The point of intersection is the Steiner

point. Figure 2.12 shows the addition of the Steiner vertex s, caused by the fact that

the vertex v3 (belonging to the right wing) is invisible from v1. We calculate the

z-coordinate of s using a linear interpolation:

sz =v1z · ||sv2|| + v2z · ||v1s||

||v1v2||

Figure 2.13 shows the second case: the intermediate vertex vj+1 is invisible from the

vertices v0 and v1, hence we add a vertex s located on the polygon edge e, setting

sz = v0z = v1z.

The necessity to add Steiner points depends on the visibility of internal skeleton

vertices from the polygon vertices v0 and v1. In the rest of this section we show

24

Page 39: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

sf(e)

ev0 v1

v2vi+1

vi+3

v3v5vivi+2

v4

Figure 2.12: A Steiner point for a right wing vertex

vj+2

f(e)

ev0 v1

vjvk−2

vk−3

vk−4

vk−1

vj+3

vj+1

s

Figure 2.13: A Steiner point for an intermediate vertex

25

Page 40: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

vr

f(e)

ev0 v1

v2`(v1vt)

vr−2

vt+1

vt

vt−1

vr−1

Figure 2.14: Visibility of the right wing vertices

how to compute effectively the visibility of the vertices belonging to the wings. The

triangulation algorithm, presented in the following section, uses this information to

perform the triangulation in O(k) time.

Without loss of generality, we restrict our attention to the right wing (the com-

putation for the left wing is similar). Refer again to Figure 2.11. The leftmost vertex

in the right wing is vi+1, which is always visible from v1 (otherwise the monotonicity

of the face with respect to e would be violated). We start from this vertex and pro-

ceed toward v1 determining the visibility of the vertices. Algorithm 2 performs this

operation in time which is linear in k, the size of the straight skeleton face.

The following observation facilitates greatly the above computation.

Observation 1 Let vr, vt, and vt−1 be face boundary vertices which belong to

the right wing, r > t. See Figure 2.14. Assume that vr is visible from v1, while

vr−1, vr−2, . . . , vt are all located above or on the line v1vr (and therefore invisible

from v1), and that vt−1 is located strictly below the mentioned line. Then vt−1 is

visible from v1.

Proof. Assume for contradiction that vt−1 is not visible from v1. Thus the segment

26

Page 41: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

Algorithm 2: Computing visibility for the right wing

Procedure ComputeVisibility(Vertices, Visibility)Input: Vertices[0, . . . , k − 1], containing the face vertices v0, . . . , vk−1.

Output: Visibility [2, . . . , i + 1], containing the visibility of the verticesv2, . . . , vi+1 from v1.

Visibility [i + 1] ← visible;currentIndex ← i;visibilityFlag ← true;while currentIndex > 1 do

if visibilityFlag thenif not isStrictlyAboveTheLine(Line(Vertices [1],Vertices[currentIndex ]),

Vertices[currentIndex ])then

visibilityFlag ← false;Visibility [currentIndex ] ← invisible;interferingVertex ← currentIndex + 1;

elseVisibility [currentIndex ] ← visible;

endifelse

if isAboveTheLine(Line(Vertices [1],interferingVertex),Vertices[currentIndex ])

thenVisibility [currentIndex ] ← invisible;

elsevisibilityFlag ← true;Visibility [currentIndex ] ← visible;

endifendifcurrentIndex ← currentIndex + 1;

endwhile

27

Page 42: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

v1vt−1 intersects a face boundary edge vqvq+1. Assuming that q ≤ t − 1, we get a

contradiction to Theorem 2. On the other hand, the assumption q > r contradicts

the monotonicity of the face. The remaining possibility is, therefore, t − 1 < q ≤ r.

However, this means that at least one of the vertices vr−1, vr−2, . . . , vt is located

below the line `(v1vt), which contradicts the terms of the observation. ¥

With Observation 1 at hand, we are confined to a single check for every boundary

vertex traversed in the right wing. Hence, we attain a linear-time complexity in

Algorithm 2.

2.2.3 Triangulation algorithm

The general idea of the algorithm is to cut a straight skeleton face alternately from

the right and left sides. Each cut creates zero, one, or two triangles depending on the

visibility of the vertices. Algorithm 3 shows this triangulation process.

Algorithm 3: Triangulation of a straight skeleton face

Procedure Triangulation(F, Triangles)Input: F - straight skeleton face.

Output: Triangles - triangulation of the face F.

Triangles ←− ∅;isLeftCut ←− true;while (F contains at least 3 vertices) do

if isLeftCut thenLeftCut(Triangles , F);

elseRightCut(Triangles , F);

endifisLeftCut ←−not isLeftCut ;

endwhile

The cuts diminish the face F until it becomes a triangle and the process stops.

28

Page 43: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

e

v4v2

v3v5

v1

f(e)

v0

(a) Right wing vertex

v4

v0 e v1

v2

f(e)v3

(b) Intermediate vertex

Figure 2.15: RightCut for visible vertices

The operations performed by the procedures LeftCut and RightCut are symmetric,

therefore, we examine only RightCut.

The procedure RightCut follows the strategy outlined in the previous section,

attempting to connect the vertices v1 and v3 by a diagonal and create the triangle

∆v1v2v3 (Figure 2.15).

Figure 2.15 shows the cases in which v3 is visible from v1. The result of the

procedure does not depend on the type of v3 (right wing or intermediate vertex).

The procedure creates the triangle ∆v1v2v3 and cuts it from f(e). The face’s edge

v0v1 remains untouched. If v3 is a right wing vertex, then we compute its visibility

using Algorithm 2. If v3 is an intermediate vertex, then it is visible from v1 when the

vertex v2 lies strictly above the line passing through v1 and v3.

If v3 is invisible from v1 and it belongs to the right wing, RightCut creates the

Steiner point v ′3 (upon the edge v1v2) and the triangles ∆v ′3v2v3, ∆v ′3v3v4 (Figure

2.16). This does not modify the edge v0v1.

In the remaining case, the vertex v3 is invisible from v1 and it belongs to the

intermediate vertices (Figure 2.17). If v3 is closer to v0 than v1, RightCut does not

cut anything and pass the turn to the procedure LeftCut. Otherwise, RightCut

29

Page 44: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

v1e

f(e)

v3

v5v7

v4

v6

v2

v ′3

v0

Figure 2.16: RightCut for an invisible right wing vertex

v3

v0

v5

f(e)

e v1v ′3

v4

v2

Figure 2.17: RightCut for an invisible intermediate vertex

30

Page 45: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 2. THEORETICAL AND PRACTICAL ISSUES

creates the Steiner point v ′3 upon the face’s edge v0v1 and cuts the triangles ∆v ′3v1v2

and ∆v ′3v2v3. The edge v0v1 shrinks to v0v′3.

The entire procedure is shown in Algorithm 4.

Algorithm 4: RightCut of a straight-skeleton face

Procedure RightCut(Triangles, F)Input: F = {v0, v1, v2, v3, . . . , vk} - part of the straight skeleton face,

Triangles - set of triangles.

Output: F, Triangles.

if v3 is a right wing vertex thenif v3 is visible from v1 then

Triangles ←− Triangles ∪ ∆v1v2v3;F ←− {v0, v1, v3, . . . , vk};

elseCreate the Steiner point v ′3; (Figure 2.16)Triangles ←− Triangles ∪ ∆v ′3v2v3 ∪ ∆v ′3v3v4;F ←− {v0, v1, v

′3, v4, . . . , vk};

endifelse

if v2 is strictly above the line v1v3 thenTriangles ←− Triangles ∪ ∆v1v2v3;F ←− {v0, v1, v3, . . . , vk};

elseif (||v0v3|| ≥ ||v1v3||) then

Create Steiner point v ′3; (Figure 2.17)Triangles ←− Triangles ∪ ∆v ′3v1v2 ∪ ∆v ′3v2v3;F ←− {v0, v

′3, v3, v4, . . . , vk};

endifendif

endif

31

Page 46: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique
Page 47: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

Chapter 3Subdivision

3.1 Smoothness and Subdivision

The solid objects, constructed by the straight-skeleton-based interpolation, often have

irregular surfaces and sharp dihedral angles between faces. This is not always suit-

able for the reconstruction, and often creates disappointing artifacts in the morphing

process. There are two sources for these irregularities:

• Significant differences in the adjacent input slices; and

• Rough triangulation of the faces, induced by the straight skeleton.

The classic way of smoothing the interpolated surface is to subdivide it [CC78]. Tra-

ditional methods of 3D subdivision (the Butterfly scheme [DGL90], Loop’s scheme

[Lo87], etc.) operate on the surface mesh itself. These schemes are chiefly classified

as either approximating, where the original vertices are not retained at newer levels

of the subdivision, or interpolating, where the process makes sure that the original

vertices are carried over to the next level of the subdivision. One of the drawbacks of

the approximating methods is their divergence from the original surface induced by

33

Page 48: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

the real input data. On the other hand, the interpolating schemes can create certain

artifacts.

Our approach is based on extending a spline subdivision scheme to operate on

a set of 2D parallel cross-sections. Dyn and Farkhi [DF01] use the representation

of spline subdivision schemes in terms of repeated averaging, and replace the usual

average (a convex combination) by a binary averaging operator termed the metric

average. Section 3.2 gives an overview of the metric average. In Section 3.3 we define

the straight skeleton average (which is quite similar to the metric average), and then

develop in Section 3.4 a subdivision scheme based on this average. Experimental

results given in Section 4.2 show that a few iterations of our scheme produce very

smooth surfaces, at the same time preserving the original features of the input data

slices.

3.2 Metric Average

Let us first give some relevant definitions.

The Hausdorff distance between two sets A and B in Rn is defined by

Haus(A,B) = max{supx∈A

dist(x, B), supy∈B

dist(y,A)},

where the Euclidean distance from a point x to a set A is

dist(x,A) = min{|x − y| : y ∈ A}.

The motivation behind using the Hausdorff metric is that it provides a good similarity

measure between geometric shapes, indicating their degree of resemblance.

The set of all projections of a point x on a set A is

ΠA(x) = {a ∈ A : |a − x| = dist(x,A)}.

34

Page 49: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

The collection of all compact subsets of Rn is denoted by Kn.

A linear Minkowski combination of two sets A,B ∈ Kn is

αA + βB = {αa + βb : a ∈ A,b ∈ B}, for α,β ∈ R.

The metric average was first introduced in [Ar89]. Its name was coined in [DF01].

Definition 1 Let A, B be nonempty compact subsets of Rn and 0 ≤ t ≤ 1. The

t-weighted metric average of A and B is

A⊕t B = {t{a} + (1 − t)ΠB(a) : a ∈ A} ∪ {tΠA(b) + (1 − t){b} : b ∈ B}, (3.1)

where the linear combinations above are in the Minkowski sense.

Artstein [Ar89] proved the metric property of this average:

Property 1 Let A, B be nonempty compact subsets of Rn and 0 ≤ s, t ≤ 1. Then

Haus(A⊕t B,A⊕s B) = |t − s|Haus(A, B).

3.3 Straight Skeleton Average

We use the straight-skeleton-based interpolation for computing the average between

parallel cross sections. Let C1 and C2 be the lower and upper cross sections, then the

straight skeleton average of C1 and C2 is obtained by slicing the interpolated object

(defined by C1 and C2) with a parallel plane at some intermediate height. The most

natural candidate for the intermediate height is z = 0.5 (assuming z(C1) = 0 and

z(C2) = 1). In Figure 3.1 the contours of the cross sections C1 and C2 are shown

35

Page 50: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

Figure 3.1: The straight skeleton average (in black) of two contours (in green andred)

with red and green lines, respectively, while their average is shown with thick black.

(The thin edges show the straight skeleton of the region bounded by the red and the

green polygons.) However, the straight skeleton average taken at z = 0.5 can include

degenerate contours, which is unacceptable (Figure 3.2(a)). Therefore we compute

the average using the height z = 0.5 − ε (say, z = 0.499), which is almost as good as

z = 0.5, yet avoids degenerate contours (Figure 3.2(b)).1 We denote by C1 ⊕SS C2

the straight-skeleton average between the contours C1, C2.

Unlike the metric average mentioned in the previous section, the straight skeleton

average does not satisfy the metric property for Hausdorff distance (Property 1). Not

only the claim

µ Haus(C1, C2) = max{Haus(C1, C1 ⊕SS C2), Haus(C1 ⊕SS C2, C2)} µ < 1

1Choosing z = 0.5 + ε is equally good.

36

Page 51: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

(a) A degenerate contour at z = 0.5

(b) Valid contours at z = 0.499

Figure 3.2: Avoiding degenerate contours

37

Page 52: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

`2

C2b

C1

a

c

`1

Figure 3.3: Expansion of the contour

is not correct, but its weaker version

µ Haus(C1, C2) ≥ max{Haus(C1, C1⊕SS C2), Haus(C1⊕SS C2, C2)} µ < 1 (3.2)

can be disproved as well. Figure 3.3 shows a counter example for the latter claim. The

upper contour, C2, can be freely expanded to the right without almost any influence

on the average C1 ⊕SS C2. Let `1 be the distance between the vertex a and the

segment bc, `2 be the distance between d and bc, h be |z(C1)− z(C2)|, and α be the

angle ∠abc. Then

max{Haus(C1, C1 ⊕SS C2), Haus(C1 ⊕SS C2, C2)} = Haus(C1 ⊕SS C2, C2)

=

√(`1 − `2)2 +

h2

4

=

√(`1 −

1

2|bc| tan

α

2)2 +

h2

4.

38

Page 53: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

By moving the vertex a along the line ad to the right, we get asymptotically

lim`1→∞

µ = lim`1→∞

Haus(C1 ⊕SS C2, C2)

Haus(C1, C2)

= lim`1→∞

√(`1 − 1

2|bc| tan α

2)2 + h2

4√`21 + h2

= lim`1→∞

√(`1 − 1

2|bc|)2 + h2

4

`21 + h2

= 1.

However, when the adjacent cross sections do not differ significantly (most practical

data, especially medical data, have similar adjacent cross sections), we can find a

practical upper bound for µ. Empirical results of Section 4.2 show that (at least in

our experiments) µ < 0.6, which is close to the value of µ = 0.5. This value of µ

means that the average is equidistant from the input slices in terms of the Hausdorff

metric.

The lower bound for µ is also 0.5. Assume for contradiction that µ < 0.5. From

(3.2) we have

max{Haus(C1, C1 ⊕SS C2), Haus(C1 ⊕SS C2, C2)} <Haus(C1, C2)

2,

and, consequently,

Haus(C1, C1 ⊕SS C2) <Haus(C1, C2)

2, (3.3)

Haus(C1 ⊕SS C2, C2) <Haus(C1, C2)

2. (3.4)

The summation of (3.3) and (3.4) yields

Haus(C1, C1 ⊕SS C2) + Haus(C1 ⊕SS C2, C2) < Haus(C1, C2). (3.5)

39

Page 54: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

On the other hand, using the triangle inequality which holds for the Hausdorff metric

we have

Haus(C1, C1 ⊕SS C2) + Haus(C1 ⊕SS C2, C2) ≥ Haus(C1, C2),

a contradiction to Equation (3.5).

Let us denote by

C1 ⊕ζSS C2, 0 ≤ ζ ≤ 1

the parameterized version of the straight skeleton average, where ζ stands for the

height of the slicing plane used in the computation of the average. Thus,

C1 ⊕SS C2 = C1 ⊕0.5SS C2.

3.4 The Subdivision Scheme

Our subdivision scheme is an extension of the famous Chaikin algorithm for curves

[Ch74], which represents the corner-cutting paradigm.

The initial data consist of N slices, F0, F1, . . . , FN−1, located at equidistant

heights. At step k of the scheme (k ∈ N ∪ {0}), after k − 1 iterations, there are

2k(N − 2) + 2 slices Fk1 , Fk

2 , . . . , Fk2k(N−2)+2

. Each iteration consists of two actions:

refinement of the subdivision and averaging.

• Refinement at iteration k:

Fk+1,02i = Fk

i , i ∈ 0, . . . , 2k(N − 2) + 1,

Fk+1,02i+1 = Fk

i ⊕SS Fki+1, i ∈ 0, . . . , 2k(N − 2).

• Averaging at iteration k:

Fk+1,1

i+ 12

= Fk+1,0i ⊕SS Fk+1,0

i+1 , i ∈ 0, . . . , 2k+1(N − 2) + 1.

40

Page 55: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

F13

initial slices averaging steprefinement step

F00

F01

F02

F1,00

F1,01

F1,02

F1,03

F1,04

F1,112

F1,132

F1,152

F1,172

F10

F11

F12

Figure 3.4: One iteration of the subdivision scheme

• Output of iteration k:

Fk+1i = Fk+1,1

i+ 12

, i ∈ 0, . . . , 2k(N − 2) + 1.

Figure 3.4 shows a schematic example of applying a single iteration of the subdi-

vision scheme on a set of three slices, F00, F0

1, and F02. The refinement step produces

two slices, F1,01 and F1,0

3 . Together with the initial slices, they form the input for the

averaging step, which yields four final slices.

The convergence of this scheme should follow from the metric property of the

straight skeleton average and the convergence of the Chaikin algorithm. As we have

41

Page 56: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

shown in the previous section, the straight skeleton average does not hold this property

in the general case. Yet, for practical input data, we may nevertheless assume the

following alternative property:

Property 2 Let F1 and F2 be two slices. Then

µ Haus(F1, F2) ≥ max{Haus(F1, F1 ⊕SS F2), Haus(F1 ⊕SS F2, F2)},

for some 0.5 ≤ µ <√

22

= 0.707 . . . .

Once again, we emphasize that not all input data necessary fulfill this condition.

However, in practice, it is generally held. It simply means that differences between

adjacent input slices are not extreme. On the other hand, each iteration of the scheme

creates more intermediate slices which are then more similar, therefore this scheme

should improve (decrease) the factor µ (between successive slices) if it was too large

(close to√

22

).

With this assumption we can estimate the convergence of the scheme. We follow

closely the scheme of [DF01] applied to the metric average.

Lemma 1 Let Fk = {Fkα | α ∈ Z} be defined as above and let

dk = supα∈Z

Haus(Fkα, Fk

α+1). (3.6)

Then

dk ≤ (2µ2)kd0.

Proof. Let us denote

dk,j = supα∈Ij−1

Haus(Fk,jα , F

k,jα+1),

42

Page 57: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

where

Ij =

Z, j odd;

12Z \ Z, j even.

It follows from Property 2 that

Haus(Fk,0β , Fk,0

β±1) ≤ µdk−1, β ∈ Z,

and, consequently

dk,0 ≤ µdk−1.

For α ∈ Z, by the triangle inequality and Property 2,

Haus(Fk,1α− 1

2

, Fk,1α+ 1

2

) ≤ Haus(Fk,1α− 1

2

, Fk,0α ) + Haus(Fk,0

α , Fk,1α+ 1

2

)

≤ µ Haus(Fk,0α−1, F

k,0α ) + µ Haus(Fk,0

α , Fk,0α+1)

≤ 2µdk,0,

and, therefore

dk,1 ≤ 2µdk,0.

This implies

dk = dk,1 ≤ 2µ2dk−1. (3.7)

Hence

dk ≤ (2µ2)kd0.

¥

In the kth step of the subdivision, the corresponding piecewise-linear interpolating

set-valued function Fk(t) is constructed in the following manner:

Fk(t) = Fki ⊕2kt−i

SS Fki+1, i2−k ≤ t ≤ (i + 1)2−k, i ∈ Z. (3.8)

43

Page 58: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

Lemma 2 Let the sequence {Fk(·)}k∈Z+ be defined as above. Then,

Haus(Fk+1(t), Fk(t)) ≤ (3µ2 + µ)dk, k ∈ Z+.

Proof. By the definition of the subdivision scheme and the triangle inequality we

obtain

Haus(Fk+12α , Fk

α) = Haus(Fk+1,02α , Fk+1,1

2α )

≤ µHaus(Fk+1,02α , Fk+1,0

2α+1 )

≤ µ2Haus(Fk+1,0α , Fk+1,0

α+1 )

= µ2Haus(Fkα, Fk

α+1)

≤ µ2dk.

(3.9)

We consider two possible cases of t.

1. α2−k ≤ t ≤ (α + 12)2−k:

It follows from (3.8) and Property 2 that

Haus(Fkα, Fk(t)) ≤ µdk,

Haus(Fk+1(t), Fk+12α ) ≤ dk+1.

therefore, by the triangle inequality, (3.9), Property 2, and (3.7), we have

Haus(Fk+1(t), Fk(t)) ≤Haus(Fk+1(t), Fk+12α ) + Haus(Fk+1

2α , Fkα) + Haus(Fk

α, Fk(t))

≤dk+1 + µ2dk + µdk

≤2µ2dk + µ2dk + µdk = (3µ2 + µ)dk.

44

Page 59: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

2. (α + 12)2−k ≤ t ≤ (α + 1)2−k:

By (3.8) and Property 2 we get

Haus(Fkα+1, F

k(t)) ≤ µdk,

Haus(Fk+1(t), Fk+12(α+1)) ≤ dk+1.

Analogously to the previous case,

Haus(Fk+1(t), Fk(t)) ≤Haus(Fk+1(t), Fk+12(α+1)) + Haus(Fk+1

2(α+1), Fkα+1)

+ Haus(Fkα+1, F

k(t))

≤dk+1 + µ2dk + µdk

≤2µ2dk + µ2dk + µdk = (3µ2 + µ)dk.

¥

Before we prove the convergence of the scheme and its approximation property, we

introduce two important definitions.

Definition 2 A sequence {Fk(t)}k is a Cauchy sequence in Kn if for each t it satisfies

limmin(p,q)→∞

Haus(Fp(t), Fq(t)) = 0, for every p, q ∈ Z+.

Definition 3 A set-valued function F(t) : R → Kn such that

Haus(F(t1), F(t2)) ≤ C|t1 − t2|

for all t1, t2 ∈ R, where C is a constant independent of t1 and t2, is called a Hausdorff

Lipschitz continuous function with a Lipschitz constant C.

Theorem 3 The sequence {Fk(·)}k∈Z+ converges uniformly to a set-valued function

F∞(·).

45

Page 60: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

Proof. By the triangle inequality, for any positive integer M, we have

Haus(Fk+M(t), Fk(t)) ≤k+M−1∑

i=k

Haus(Fi+1(t), Fi(t)),

and, by Lemmas 1 and 2, we get

Haus(Fk+M(t), Fk(t)) ≤ (3µ2 + µ)

k+M−1∑

i=k

di

= (3µ2 + µ)(dk + dk+1 + dk+2 + · · ·+ dk+M−1)

≤ (3µ2 + µ)[(2µ2)kd0 + (2µ2)k+1d0 + · · ·+ (2µ2)k+M−1d0]

= (3µ2 + µ)(2µ2)kd0[1 + 2µ2 + (2µ2)2 + · · ·+ (2µ2)k+M−2]

≤ (3µ2 + µ)(2µ2)k

1 − 2µ2d0. (3.10)

This implies that, for every t, the sequence {Fk(t)}k is a Cauchy sequence in Kn, and,

since Kn is a closed metric space under the Hausdorff metric, the sequence {Fk(t)}k

uniformly converges, for every t, to a set F∞(t). ¥

Let us assume that the original input slices F0, F1, . . . , FN were obtained by sam-

pling equidistantly some Hausdorff Lipschitz continuous function G(·) with a Lips-

chitz constant C. Again, this simply means that successive slices are not too different.

Then, we can estimate how well the results of the subdivision scheme approximate G.

Theorem 4 Let the set-valued function G(·) : R → Kn be Lipschitz continuous with

a Lipschitz constant C, and let the initial sets be given by F0α = G(a + αh), α ∈ Z,

for arbitrary a ∈ [0, h). Then,

Haus(Fk(t), G(t)) ≤ Ckh, for k ∈ Z+,

where

Ck =

2C, k = 0;

(2−µ)(1+µ)1−2µ2 C, k > 0.

46

Page 61: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 3. SUBDIVISION

Proof. By (3.10), the triangle inequality, and Property 2, we get, for k ≥ 1 and t

satisfying αh ≤ t ≤ (α + 1)h,

Haus(Fk(t), G(t)) ≤ Haus(Fk(t), F0(t)) + Haus(F0(t), F0α) + Haus(F0

α, G(t))

≤ (3µ2 + µ)d0

1 − 2µ2+ d0 + Ch.

The Lipschitz condition on G implies that d0 ≤ Ch, and

Haus(Fk(t), G(t)) ≤ ((3µ2 + µ)

1 − 2µ2+ 2)Ch =

(2 − µ)(1 + µ)

1 − 2µ2Ch.

For k = 0, we get Haus(F0(t), G(t)) ≤ 2Ch. ¥

Since most of the real objects can be described by set-valued Lipschitz continuous

functions, Theorem 4 justifies the use of the subdivision scheme, as it approximates

quite well these objects.

47

Page 62: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique
Page 63: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

Chapter 4Experimental Results

An integral part of this thesis is a system for interpolation and morphing between

polygonal slices. It was implemented in C++ using Microsoft Visual C++ 7.0 (.NET).

It runs on every Win32 environment (95+/ME/XP, NT 4.0). The user interface

is based on the MFC library, while the 3-dimensional visualization uses OpenGL

facilities. The GPC (Generic Polygon Clipper) library (courtesy of Alan Murta) was

used for polygon boolean operations. The source consists of about 11,000 lines of

code.

4.1 Straight-Skeleton-Based Interpolation

Figure 4.1 shows an example which demonstrate the necessity to add Steiner points in

the triangulation process. The lower slice consists of a single square, while the upper

slice consists of four small squares (see Figure 4.1(a)). In this case, the monotone

triangulation of some skeletal faces requires Steiner points (shown by pink circles).

The visualization of the reconstructed 3D model is shown in Figure 4.1(b). We can

clearly see that the surface does not contain horizontal triangles.

49

Page 64: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

(a) Straight skeleton and triangulation

(b) Reconstructed 3D model

Figure 4.1: Addition of Steiner points

50

Page 65: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

(a) Lungs (b) Heart

Figure 4.2: Reconstruction of internal human organs

In Figure 4.2 we can see the reconstructions of internal human organs (heart and

lungs). The input (numerous parallel slices, typically from a few dozens to a few

hundreds) are produced by various medical diagnostic apparata, e.g., CT, MRI, etc.

The data of the lungs and heart were obtained by MRI.

Figure 4.3 shows another natural example—a human head.

Our program morphs between shapes with any numbers of contours, any geome-

tries, and any topologies. It is robust, and it handles easily artificial examples with

degenerate cases in nongeneral positions. In Figure 4.4 each input slice consists of

multiple ovals. The yellow shape in Figure 4.4(c) is a slice of the solid object, repre-

senting the morphing contour.

Some statistics of the input data, interpolated models, and running time of the

program (executed on a 800MHz Pentium III PC) tabulated in Table 4.1.

51

Page 66: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

(a) 3D model (b) 3D model with wireframe

Figure 4.3: Reconstruction of a human head

Model Lungs Heart Head Ovals

Input dataslices 33 30 17 2contours 85 65 26 10vertices 2861 1245 853 316

3D modelvertices 9979 4244 2947 681faces 18496 7998 5357 1018

Computations (seconds)symmetric difference 0.63 0.14 0.111 0.03straight skeleton 1.642 0.912 0.652 0.17lifting up the vertices 0.12 0.07 0.02 0.01triangulation 1.151 0.621 0.67 0.08total 3.543 1.743 1.453 0.29

Visualization (seconds)face normals 0.501 0.22 0.14 0.03vertex normals 1.002 0.37 0.27 0.03

Table 4.1: Summary of interpolation statistics

52

Page 67: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

(a) Straight skeleton and morphing contour

(b) 3D model (c) Wireframe of 3D model

Figure 4.4: Multiple ovals

53

Page 68: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

4.2 Subdivision

In this section we apply the subdivision scheme, developed in Chapter 3, to several

examples having uneven surfaces. We start with synthetic examples, denoted as

Sample 1, Sample 2, and Sample 3. Figure 4.5 demonstrates the smoothing effect of

five iterations applied on the initial model of Sample 1 (Figure 4.5(a)). The result

of each iteration is shown separately. Similarly, we apply six iterations on Samples 2

and 3. The final results, along with the initial models, are shown in Figures 4.6 and

4.7, respectively. The edges of the initial models highlight the irregularities in these

examples.

We estimate the convergence properties of the subdivision scheme using the fol-

lowing criteria:

1. Hausdorff distance. Denoted as dk and defined in Equation (3.6), where k is

the number of iterations. This is the most natural criterion since we expect it

to behave according to Theorem 1, that is, to vanish exponentially fast(as a

function of k).

2. Partial volume. We cannot compare the volumes, measured for the whole solid

objects, because after each iteration the distance between the exterior slices is

reduced. (Refer again to Figure 3.4 to see this effect.) Therefore, in order to get

consistent results, we measure partial volumes. Let hk1 and hk

2 be the heights of

the external slices after applying k iterations. Let Mi, for i ∈ {0, . . . , k}, be the

solid object reconstructed after i iterations. Then, its partial volume, Vk(Mi),

is defined as the volume of the portion of Mi bounded by the xy-parallel planes

hk1 and hk

2 .

The values of these measures, computed after each iteration for all the examples,

54

Page 69: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

(a) Initial model (b) First iteration

(c) Second iteration (d) Third iteration

(e) Fourth iteration (f) Final model (5th iteration)

Figure 4.5: The smoothing effect of the subdivision (Sample 1)

55

Page 70: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

(a) Initial model (b) Final model (6th iteration)

Figure 4.6: Subdivision scheme applied to Sample 2

(a) Initial model (b) Final model (6th iteration)

Figure 4.7: Subdivision scheme applied to Sample 3

56

Page 71: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

Iteration No. of slices Partial volume Hausdorff No. of vertices Computations

distance (sec.)

Sample 10 4 8.87272373952 1.417752 30 –1 6 8.83421428967 0.690729 130 0.1702 10 8.82486823318 0.361926 433 0.9913 18 8.82223615149 0.191978 815 5.0684 34 8.82126658796 0.103955 1364 13.0195 66 8.82036743504 0.052952 2433 24.585

Sample 20 3 8.17632096131 3.872087 21 –1 4 7.38264328872 2.130979 117 0.1302 6 7.26501625469 1.184553 494 1.0713 10 7.24052644925 0.620085 1129 8.4024 18 7.23284337446 0.373530 1895 15.2785 34 7.23053840427 0.226079 3236 29.4136 66 7.22972167580 0.113955 5784 56.011

Sample 30 3 5.29002509523 3.041381 15 –1 4 4.99048020897 1.356730 107 0.1212 6 4.92984185629 0.694839 375 0.8613 10 4.91571186104 0.324868 751 4.5474 18 4.91225041103 0.161424 1297 12.2975 34 4.91122753827 0.082651 2220 24.4356 66 4.91065953512 0.041468 4073 43.883

Table 4.2: Subdivision scheme applied on synthetic samples

are tabulated in Table 4.2. Figure 4.8 shows a plot of the Hausdorff distances (dk

above), as a function of the number of iterations. In Figure 4.8(b) the Y-axis is log-

scaled (with base 2). We can clearly see the near-linear graphs, which indicate the

exponential convergence of the scheme in terms of the Hausdorff metric.

Figure 4.9 shows the result of applying five iterations of the subdivision scheme

on a medical sample (a portion of the human lungs). Unlike the previous synthetic

samples, its initial irregularities are less significant. Table 4.3 contains the values of

57

Page 72: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

0

0.5

1

1.5

2

2.5

3

3.5

4

0 1 2 3 4 5 6

Hau

sdor

ff di

stan

ce

Number of iterations

sample 1sample 2sample 3

(a) Normal scale

0.03125

0.0625

0.125

0.25

0.5

1

2

4

0 1 2 3 4 5 6

Hau

sdor

ff di

stan

ce

Number of iterations

sample 1sample 2sample 3

(b) Half-logarithmic scale

Figure 4.8: Convergence of the scheme for synthetic inputs, Hausdorff metric

58

Page 73: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

(a) Initial model

(b) Final model (5th iteration)

Figure 4.9: Subdivision scheme applied on a medical sample

59

Page 74: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

Iteration No. of slices Partial volume Hausdorff No. of vertices Computations

distance (sec.)

0 10 0.12264217180 0.152820 301 –1 18 0.12233830244 0.091203 746 1.8722 34 0.12213281128 0.053001 1284 6.0693 66 0.12197753298 0.026914 2319 13.1794 130 0.12185619892 0.014283 4330 25.0965 258 0.12174744879 0.007486 8275 45.765

Table 4.3: Subdivision scheme applied on a medical sample

the partial volume and the Hausdorff distance, computed after each iteration of this

experiment. Figure 4.10 shows a graph that reflects the exponential convergence of

the scheme.

4.3 Morphing Video

The morphing process needs only slide the offset polygons between the input shapes,

such that vertices are slid (and are possibly merged or split) along the skeletal edges.

The speed of the sliding is proportional to the slope of the respective (lifted up)

edges. This is equivalent to intersecting the interpolating surface with a series of

parallel planes.

The video segment [BY03] contains several examples of two-dimensional morphing,

which can be found on the accompanying CD in the file ‘ \Video \video.avi’ . It

displays a few sessions of running the software, captured by CamStudio 2.1 and edited

with Adobe Premiere 6.0.

In the first example the most basic problem of morphing between two polygonal

shapes is presented. There are two squares in the first shape and one rectangle in

the second shape. This example demonstrates the two-dimensional morphing process

60

Page 75: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0 1 2 3 4 5

Hau

sdor

ff di

stan

ce

Number of iterations

lungs

(a) Normal scale

0.00390625

0.0078125

0.015625

0.03125

0.0625

0.125

0.25

0 1 2 3 4 5

Hau

sdor

ff di

stan

ce

Number of iterations

lungs

(b) Logarithmic scale

Figure 4.10: Convergence of the scheme for a medical input, Hausdorff metric

61

Page 76: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 4. EXPERIMENTAL RESULTS

and its visualization in three dimensions. The second example is also simple, yet

the monotone triangulation of some skeletal faces requires Steiner points (shown by

pink circles). The remaining portion of the video shows morphing between more

complicated input shapes.

62

Page 77: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

Chapter 5Conclusion

In this research we have designed and implemented a morphing technique between 2D

geometric shapes using straight-skeleton-based interpolation. It proved to be robust

and efficient, being able to morph shapes with different geometries and topologies.

We have found that the algorithm for computing the straight skeleton of a sim-

ple polygon suffers from numerical instability, which can lead to erroneous results.

This is the result of the simulative nature of the algorithm, because degenerate struc-

tures can be created and processed during the simulation. Future work can include

the construction of a numerically stable, yet efficient, algorithm for straight-skeleton

computation.

The triangulation step, discussed in Section 2.2, has a strong influence on the prop-

erties of the reconstructed surface, and, consequently, is important for the sequence

of the intermediate slices needed for visualizing the morphing. We have succeeded to

devise a triangulation method which ensures that the reconstructed surface is always

slanted, and, therefore, does not pose problems for morphing. The triangulation al-

gorithm utilizes the geometric properties of straight skeleton (some of which we have

63

Page 78: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

CHAPTER 5. CONCLUSION

discovered and proven) and in some cases requires additional (Steiner) vertices. It

is very efficient as it runs in time linear in the complexity of the triangulated entity.

On the other hand our triangulation method does not give meaning to the possible

symmetry between several straight skeleton faces. While the most practical input

data usually do not exhibit symmetric features, synthetic data do. Therefore, such

behavior of the algorithm can create unpleasant asymmetrical morphing sequences

for symmetrical structures. The problem of symmetrical triangulation of the straight

skeleton faces is worth studying.

The subdivision scheme, proposed in Chapter 3, attain considerable results in

smoothing the solid objects constructed by the straight-skeleton-based interpolation,

especially for the synthetic input. Yet, it subdivides the surface along the Z axis only.

A possible improvement of the scheme can thus be the addition of a subdivision of the

surface also along the X and Y axes. We expect that this will significantly enhance

the smoothing of the surface.

64

Page 79: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

References

[AAAG95] O. Aichholzer, F. Aurenhammer, D. Alberts, and

B. Gartner, A novel type of skeleton for polygons, J. of Uni-

versal Computer Science, 1(1995), 752–761.

[AM99] M. Alexa and W. Muller, The morphing space, Proc. 7th Int.

Conf. in Central Europe on Computer Graphics, Visualization, and

Interactive Digital Media (V. Skala, ed.), Plzen, Czech, 1999.

[Ar89] Z. Artstein, Piecewise linear approximations of set-valued maps,

J. of Approximation Theory, 56(1989), 41–47.

[BCL96] C.L. Bajaj, E.J. Coyle, and K.-N. Lin, Arbitrary topology

shape reconstruction from planar cross sections, Graphical Models

and Image Processing, 58(1996), 524–543.

[BGLS03] G. Barequet, M.T. Goodrich, A. Levi-Steiner, and

D. Steiner, Straight-skeleton based contour interpolation, Proc.

14th Ann. ACM-SIAM Symp. on Discrete Algorithms, Baltimore,

MD, 119–127, 2003 (full version to appear in Graphical Models).

65

Page 80: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

REFERENCES

[BKOS00] M. de Berg, M. van Kreveld, M. Overmars, and

O. Schwarzkopf, Computational Geometry: Algorithms and Ap-

plications, 2nd edition, Springer-Verlag, Germany, 2000.

[Bo88] J.-D. Boissonnat, Shape reconstruction from planar cross sec-

tions, Computer Vision, Graphics, and Image Processing, 44(1988),

1–29.

[BS96] G. Barequet and M. Sharir, Piecewise-linear interpolation be-

tween polygonal slices, Computer Vision and Image Understanding,

63(1996), 251–272.

[BY03] G. Barequet and E. Yakersberg, Morphing between shapes

by using their straight skeletons, Proc. 19th ACM Symp. on Com-

putational Geometry, San Diego, CA, 378–379, 2003.

[CC78] E. Catmull and J. Clark, Recursively generated B-spline sur-

faces on arbitrary topological meshes, Computer Aided Design,

10(1978), 350–355.

[Ch74] G. Chaikin, An algorithm for high speed curve generation, Com-

puter Graphics and Image Processing, 3(1974), 346–349.

[CSW95] F. Chin, J. Snoeyink, and C.-A. Wang, Finding the medial

axis of a simple polygon in linear time, Proc. 6th Int. Sym. on

Algorithms and Computation, Cairns, Australia, 1995.

[DF01] N. Dyn and E. Farkhi, Spline subdivision schemes for compact

sets with metric averages, in: Trends in Approximation Theory

66

Page 81: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

REFERENCES

(K. Kopotun, T. Lyche, and M. Neamtu, eds.), Vanderbilt Univ.

Press, Nashville, TN, 95–104, 2001.

[DGL90] N. Dyn, J. Gregory, and D. Levin, A butterfly subdivision

scheme for surface interpolation with tension control, ACM Trans.

on Graphics, 9(1990), 160–169.

[EE99] D. Eppstein and J. Erickson, Raising roofs, crashing cycles,

and playing pool: Applications of a data structure for finding pair-

wise interactions, Discrete & Computational Geometry, 22(1999),

569–592.

[FO98] P. Felkel and S. Obdrzalek, Straight skeleton implementa-

tion, Proc. Spring Conf. on Computer Graphics, Budmerice, Slo-

vakia, 210–218, 1998.

[FO99] P. Felkel and S. Obdrzalek, Improvement of Oliva’s algo-

rithm for surface reconstruction from contours, Proc. Spring Conf.

on Computer Graphics (J. Zara, ed.), Budmerice, Slovakia, 254–

263, 1999.

[Ke75] E. Keppel, Approximating complex surfaces by triangulation of

contour lines, IBM J. of Research and Development, 19(1975), 2–

11.

[Lo87] C. Loop, Smooth subdivision surfaces based on triangles, M.Sc.

Thesis, Dept. of Mathematics, Univ. of Utah, 1987.

[OPC96] J.-M. Oliva, M. Perrin, and S. Coquillart, 3D reconstruc-

tion of complex polyhedral shapes from contours using a simplified

67

Page 82: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

REFERENCES

generalized Voronoi diagram, Computer Graphics Forum, 15(1996),

C397–408.

[Wol98] G. Wolberg, Image morphing: A survey, The Visual Computer,

14(1998), 360–372.

68

Page 83: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

i"r zeixhne`ib zexev oia Morphing

ix`pil cly zqqean divletxhpi`

bxaqxwri ipbai

Page 84: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique
Page 85: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

i"r zeixhne`ib zexev oia Morphing

ix`pil cly zqqean divletxhpi`

xwgn lr xeaig

x`ez zlawl zeyixcd ly iwlg ielin myl

aygnd ircna mircnl xhqibn

bxaqxwri ipbai

l`xyil ibelepkh oekn — oeipkhd hpql ybed

2004 i`n dtig c"qyz xii`

Page 86: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique
Page 87: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

zwxa lib x"c ly eziigpda jxrp xwgnd

aygnd ircnl dhlewta

izenlzyda daicpd zitqkd dkinzd lr oeipkhl dcen ip`

Page 88: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique
Page 89: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

mipipr okez

xi (zilbp`a) xivwz

1 `ean 1

1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . zexev befine Morphing 1.1

2 . . . . . . . . . . . . . . . . . . . . . . . . miliawn mikzgn ghyn xefgy 1.2

4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix`pil cly lr dxiwq 1.3

5 . . . . . . . . . . . . . . . . . . . . . . ix`pil cly zqqean divletxhpi` 1.4

6 . . . . . . . . . . . . . . . . . ghyn zivletxhpi` i"r icnin-ec Morphing 1.5

7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dfzd oebx` 1.6

9 ix`pil cly aeyig ly zeiyrn zeihxe`z zeibeq 2

9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix`pil cly aeyig 2.1

10 . . . . . . . . . . . . . . . . . . . Felkel-Obdrzalek ly mzixebl`d 2.1.1

11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . mzixebl`d zepekp 2.1.2

16 . . . . . . . . . . . . . . . . . . . . . . ix`pil cly ze`t ly divlebp`ixh 2.2

17 . . . . . . . . . . . . . . ix`pil cly ze`t ly zeixhne`ib zepekz 2.2.1

23 . . . . . . . . . . . . . . . . . . . . . . . . . . ze`xpe zecewp ztqed 2.2.2

d

Page 90: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

mipipr okez

28 . . . . . . . . . . . . . . . . . . . . . . . . divlebp`ixhd mzixebl` 2.2.3

33 dwelg-zz 3

33 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dwelg-zze zewlg 3.1

34 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixhn revin 3.2

35 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix`pil cly i"r revin 3.3

40 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dwelg-zz ly dnkq 3.4

49 zeiieqp ze`vez 4

49 . . . . . . . . . . . . . . . . . . . . . . ix`pil cly zqqean divletxhpi` 4.1

54 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . dwelg-zz 4.2

60 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Morphing 4.3

63 mekiq 5

65 zexewn zniyx

`i (zixara) xivwz

e

Page 91: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

mixei` zniyx

5 . . . . . . . . . . . . . . . . . . . . . . . . . ix`pil clya mirexi` ibeq ipy 1.1

11 . . . . . . . . . . . . . . . . Felkel-Obdrzalek ly mzixebl`l iziira hlw 2.1

14 . . . . . . . . . . . . . . . . . . . . . . . mipey`xd mirexi`d zyely ceair 2.2

15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . mzixebl`d ly oelyk 2.3

16 . . . . . . . . . . . . . . . . . . . . . . . . . . ix`pil cly ly ziziira d`t 2.4

18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix`ipil cly ly d`t 2.5

19 . . . . . . . . . . . . . . . . . . . . . . . ∠v0v1v2 zieefd ly zeiexyt` izy 2.6

19 . . . . . . . . . . . . . . . . . . . . . . . . . . d`td ly zeipehepenl dxizq 2.7

20 . . . . . . . . . . . . . . . . . ∠v0v1v2 zieefd ly ipyd dxwnd xear dgpd 2.8

20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . zelvtzd rexi` 2.9

21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rlv rexi` 2.10

23 . . . . . . . . . . . . . . . . . . . . . ix`pil cly z`t ly ziznkq dbevz 2.11

25 . . . . . . . . . . . . . . . . . . . . ipni sb`a cewcew xear Steiner zcewp 2.12

25 . . . . . . . . . . . . . . . . . . . . . . . miipia cewcew xear Steiner zcewp 2.13

26 . . . . . . . . . . . . . . . . . . . . . . . . . . ipni sb`a micewcewd ze`xp 2.14

29 . . . . . . . . . . . . . . . . . . . . . . . mi`xp micewcew xear ipni jezig 2.15

30 . . . . . . . . . . . . . . . . . . ipni sb`a d`xp izla cewcewl ipni jezig 2.16

f

Page 92: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

mixei` zniyx

30 . . . . . . . . . . . . . . . . . . . . d`xp izla miipia cewcewl ipni jezig 2.17

36 . . . . . . . . . . . . . . . . . . . . ix`pil cly i"r mixehpew ipy ly revin 3.1

37 . . . . . . . . . . . . . . . . . . . . . . . . . . . mipeepn mixehpewn zerpnid 3.2

38 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xehpewd ly zehytzd 3.3

41 . . . . . . . . . . . . . . . . . . . . . . dwelg-zz znkq ly zg` divxhi` 3.4

50 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Steiner zecewp ztqed 4.1

51 . . . . . . . . . . . . . . . . . . . . . . . miinipt seb ixa` ly divletxhpi` 4.2

52 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . y`xd ly divletxhpi` 4.3

53 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . miax milblbq 4.4

55 . . . . . . . . . . . . . (1 `nbec) dwelgd-zz znikq ly dwlgdd hwt` 4.5

56 . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 `nbec lr dnikqd zlrtd 4.6

56 . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 `nbec lr dnikqd zlrtd 4.7

58 . . . . . . . . . . . . . . . . . . miihzpiq mihlw xear dnikqd zeqpkzd 4.8

59 . . . . . . . . . . . . . . . . . . . . . . . zi`etx `nbec lr dnikqd zlrtd 4.9

61 . . . . . . . . . . . . . . . . . . . . . . i`etx hlw xear dnikqd zeqpkzd 4.10

g

Page 93: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

ze`lah zniyx

52 . . . . . . . . . . . . . . . . . . . zeivletxhpi` ly zewihqihhqd mekiq 4.1

57 . . . . . . . . . . . . . . . . . . . . zeihzpiq ze`nbec lr dnikqd zlrtd 4.2

60 . . . . . . . . . . . . . . . . . . . . . . . zi`etx `nbec lr dnikqd zlrtd 4.3

h

Page 94: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique
Page 95: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

xivwz

.dxev iepiy `id dzernyny ,metamorphosis zipeeid dlind on raep morphing byend

.izbxcd ote`a (dxhnd) zxg` dxevl (xewnd) zg` dxev jetdl `id morphing-d zxhn

-becd .icnin-zlz morphing-e icnin-ec morphing oia milican zepezpd zexevd beq itl

xear egzet zehiy ly agx oeebn .zepenz oia morphing `id cnin-eca ziq`lwd `n

.([Wol98] 'eke ,bixy i"r morphing ,dibxp` menipin oebk) ef dira

morphing :zicnin-ecd dirad ly cgein dxwn lr ald zneyz z` epcwin epxwgna

epid cg` lk) mikzgp mpi`y mixehpew xtqn lelkl dleki dxev lk .zeilpebilet zexev oia

.mixege xneg ixef` mixvei md jkae ,mippewn zeidl mileki mixehpewd .(heyt oebilet

-na .zepey zeibeleteh ilra zeixhne`ib zexev oia morphing `ed diraa ixwird xbz`d

zeaxrzd z` yexcl s`e zekaeqn zelert rval zelelr zerecid zehiyd aex ,dfk dxw

zepezpd zexevd oia (divletxhpi`) ghyn xefgy lr zqqean eply dyibd .ynzynd

.miipia ikzg ly aeyig okn xg`le (miliawn mikzgk ozhilw i"r)

oia divletxhpi`l zepeebne zeax zehiy egzet mipexg`d mixeyrd zyely jyna

ik zlaben ce`n dzidy ,[Ke75] Keppel ly ziq`lwd dceardn lgd ,miliawn mikzg

zepexg`d mipyd ly zeipxcen zeceara dlke ,mikzgd oia mieqn oeinc lr dknzqd

qqean epxwgn .illkd dxwna lthl zeqpnd ,[Bo88,BS96,BCL96,OPC96,BGLS03]

`i

Page 96: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

xivwz

cly ly yicg beqa ynzyn df mzixebl` .[BGLS03] ly divletxhpi`d mzixebl` lr

.ix`pil cly `xwpd ,ilpebilet

mya recid ,xg` cly ly div`ixe epid ,[AAAG95]-a dpey`xl bvedy ,ix`pil cly

-na izedn ote`a mipey j` ,mixenw mipebilet xear midf elld mipand ipy .medial axis

,zeileaxt zezyw mb lelkl leki xy` ,medial axis-l cebipa .mixerw mipebilet ly dxw

jildz i"r xcben P oebilet ly ix`pild clyd .cala mixyi mieewn akxen ix`pild clyd

jildz ly divleniq lr zeqqean ix`pil cly aeyigl zerecid zehiyd lk .zeveekzd

zerlvd ikxe` .deey zexidnae ziliawn dxeva dnipt P ly zerlvd lk ly zeveekzdd

i"r xvepd zieefd dveg jxe`l rp P ly cewcew lk .jildzd jldna oehwl e` lecbl mileki

,[CSW95] oebiletd lceba ix`pil onfa aeyigl ozip medial axis-dy cera .zecenv zerlv

.miaeyig ly xzei dax dcin miyxec ix`pil cly aeyigl xzeia milirid minzixebl`d

lelr oebileta mieqn cewcew ly ezieef e` enewin iepiyy jka oenh ixwird iyewd

zehiya yeniy lk zrpen ef zilaelb drtyd .ix`pild clyd lr zilaelb dxeva ritydl

cly aeyigl xzeia aehd mzixebl`d .divide-and-conquer e` zilhpnxwpi` dipa enk

O(n1+ε + n8/11+εr9/11+ε) `ed ezvix onfe ,[EE99] Erickson-e Eppstein i"r rved ix`pil

.mixerwd micewcewd xtqn `ed r-e oebiletd zeikeaiq `ed n xy`k ,ε > 0 lkl

lbeqn `ed .hlwd lr odylk zegpd gipn `l [BGLS03] ly divletxhpi`d mzixebl`

dyelyn akxen mzixebl`d .zizexixy dxev ilra mixehpew ly edylk xtqn lr lertl

:miixwir micrv

;iawr oeeika jzg lka mixehpewd oeek .1

;mikzgd ly overlay-d aeyigl .2

.mikzgd oia divletxhpi` ghyn aeyig .3

aygn ipyd crvd .mikzgd ipya mixege xneg ixef` oekp xicbdl ick yexc oey`xd crvd

ly mi`zd z` miaygn ,B-e A mikzgd xear ,epiidc) .mikzgd ly ixhniqd yxtdd z`

ai

Page 97: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

xivwz

`ed :mzixebl`d ly eal epid iyilyd crvd .(milirt mi`z mi`xwpd ,(A\B) ∪ (B\A)

,ix`pild clyd i"r zexyend ze`td yeliy ,lirt `z lk ly ix`pil cly aeyign akxen

mikzgd oia ixhniq yxtd ly ix`pil clya yeniyd .cnin zlzl divlebp`ixhd znxde

.mdipia dwlg divletxhpi` zlawl ipeig aikxn epid

z`f .miliawn hlw ikzg n lr lrtiy jk mzixebl`d z` aigxdl ozip irah ote`a

.eayegy divletxhpi`d ighyn xeyxye cxtpa mikenq mikzg bef lk lr ezlrtd i"r

labend icnin-zlz seb ly jezig zervn`a zrvazn icnin-ecd morphing-d zniyn

sebd z` mikzeg .mdipia divletxhpi`d ghyn i"re ,dlrnlne dhnln hlw ikzg ipy i"r

mi`vnp mixeyind ,llk jxca .hlwd ikzg oia miavend miliawn mixeyin zxcq mr

svx lawl ozip dtetv witqn miipia ixeyin zxcq zervn`a .dfn df mieey miwgxna

.miixewnd mikzgd oia morphing-d zincd z` xyt`nd mikzg

oia divletxhpi`l zexeywd ,zeiyrne zeihxe`iz zeiraa milthn epgp` 2 wxta

cly aeyigl Felkel-Obdrzalek mzixebl`a ynzydl rved [BGLS03] dceara .mikzgd

epid dfd mzixebl`d ,ix`pil cly aeyigl miniiwd minzixebl`d hrnn .[FO98] ix`pil

xy`k ,O(n(r + log n)) `ed ezvix onf .mzehyte miaeyigd zeliri oia dxiaq dxyt

ohw xtqn ozpida .dn`zda ,mixerwd micewcewd xtqne oebiletd zeikeaiq md r-e n

xeng iewil ep`vn ,lfnd rexl .ix`pil hrnk onfa ux mzixebl`d ,mixerw micewcew ly

z` epilib .miaeyigd x`yl rixtdl s`e zeieby ze`vezl `iadl lelr xy` mzixebl`a

.mzixebl`l oewiz eprvde iewild xewn

zexyend ze`td yeliy `ed divletxhpi`d ghyn ziipaa miigxkdd micrvd cg`

micewcew mpid mdicewcew lk xy`) miiwte` miyleyn ly zegkepd .ix`pild clyd i"r

.ezeki`e ghynd ly zeiaihi`ehpi`l wifdl dlelr (daebd eze` ilra clyd ly miinipt

jezgl miqpn epgp`e li`ed morphing-d jildz z` mikaqn dl` miyleyn ,ok lr xzi

-eyn zxvei dlibx divlebp`ixh lk mda mixwn s` miniiw .iwte` xeyin i"r mze`

Steiner zecewp dtiqend ,zcgein divlebp`ixh zhiy epgzit ,jkitl .miiwte` miyl

bi

Page 98: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

xivwz

lr qqean eply divlebp`ixhd mzixebl` .miizira miyleyn zxvei dpi`e ,jxevd zra

ote`a lret mzixebl`d .ix`pild clyd i"r zexyend ze`td ly zeixhne`ibd zepekzd

.hlwd lceba ix`pil onf yxece liri

-zirl mpid ,ix`pil cly zqqean divletxhpi` i"r mipapd ,miicnin-zlzd mitebd

`l dfk xac ,mizrl .ze`td oia zecg zeieefe mixicq `l mighyn ilra zeaexw mi

.morphing-d jildza zeafk`n i`eel zertezl mxeb `ed minrtle ,divletxhpi`l mi`zn

zenikqd .eilr dwelg-zz zlrtd `ed divletxhpi`d ghyn zwlgdl iq`lwd oexztd

zebeeqn el` zenikq .envr bixyd lr zelret zicnin-zlz dwelg-zz ly zelaewnd

-ixewnd micewcewd lr zexney opi` xy` ,zeaxwn zenikq :zeixwir zeixebhw izyl

zeirad zg` .mdilr zexney xy` ,zeiaihletxhpi` zenikqe ,dwelgd-zz jldna mi

,jci`n .izin` hlw i"r dxyend ixewnd ghyndn diihq `id zeaxwn zenikq ly

.zenieqn i`eel zertez xevil zelelr zeiaihletxhpi`d zenikqd

,splines zenewr ly dwelg-zz ly zeniiw zehiy ly dagxd lr zqqean eply dyibd

mikzg ipy oia ix`pil cly rvenn epxcbd jk myl .miliawn mikzg lr dplrtzy jk

ozpida .mikzgd oia ix`pil cly zqqean divletxhpi` zxfra ayegnd ,miiliawn

Chaikin ly mzixebl`d ly dagxdk dwelgd-zz znikq z` mixicbn ep` ,df rvenn

-i` zlrtdy ze`xn zeipeiqip ze`vez .zepit jeziga ynzyne zenewrl creind ,[Ch74]

zepekzd zxiny jez ,ce`n miwlg mighynl d`ian eply dnikqd ly zexetq zeivxh

.hlwd ikzg ly zeixewnd

zepkzd ztya dynen xy` ,morphing-e divletxhpi` zkxrn epgzit xwgnd zxbqna

zaiaq lka dvxdl zpzip zkxrnd .Microsoft Visual C++ 7.0 (.NET) zervn`a C++

-dy cera ,MFC ziixtq lr qqean ynzynd wynn .(95+/ME/XP, NT 4.0) Win32

ly dxcq `ed zkxrnl hlwd .OpenGL ly milka zynzyn zicnin-zlzd dincd

-etn mikzgd m` .Z xivl jxe`l dfn df mieey miwgxna `weec e`l ,miliawn mikzg

.mdly caekd ifkxn ztitg i"r z`f ,cg` xef`l mze` fifdl ozip ,X-Y xeyina mixf

ci

Page 99: MORPHING BETWEEN GEOMETRIC SHAPES USING STRAIGHT …barequet/theses/yakersberg-msc-thesis.pdf · tors traced out by polygon vertices during the shrinking process. S(P) is a unique

xivwz

.VRML hnxeta uaewk wqicd lr dxinyl ozip divletxhpi`d ghyn ,miaeyigd xg`l

xewnd .AVI e`cie hnxeta zicnin-ecd morphing-d zincd z` xenyl zxyt`n zkxrnd

.cew zexey 11,000-k likn

eh