CS133 Computational Geometry The Doubly-Connected Edge List (DCEL) - - PowerPoint PPT Presentation

cs133
SMART_READER_LITE
LIVE PREVIEW

CS133 Computational Geometry The Doubly-Connected Edge List (DCEL) - - PowerPoint PPT Presentation

CS133 Computational Geometry The Doubly-Connected Edge List (DCEL) Data Structure 1 DCEL DCEL stands for Doubly-Connected Edge List It is a data structure for representing topological information about a planar graph It also has some


slide-1
SLIDE 1

CS133

Computational Geometry

The Doubly-Connected Edge List (DCEL) Data Structure

1

slide-2
SLIDE 2

DCEL

DCEL stands for Doubly-Connected Edge List It is a data structure for representing topological information about a planar graph It also has some applications in representing 3D meshes

2

slide-3
SLIDE 3

Terminology

3

Vertex Edge Face

slide-4
SLIDE 4

Elements of DCEL

4

Vertex Half Edges Face

slide-5
SLIDE 5

1- The Vertex Object

Each vertex stores a single pointer to a HalfEdge that is leaving this vertex A vertex stores the coordinates of this point (not needed in other applications when only topology is required) Vertex {

HalfEdge* leaving; Double x, y;

}

5

slide-6
SLIDE 6

2- The HalfEdge Object

The HalfEdge contains pointers to

The origin Vertex The Face that is incident to the left of the HalfEdge The twin HalfEdge that points to the other half of this edge (the one to its right). The next HalfEdge that originates from the destination of this HalfEdge and is incident to the same face

6

slide-7
SLIDE 7

2- The Half Edge Object

HalfEdge{

Vertex* origin; Face* face; HalfEdge* twin; HalfEdge* next;

}

7

slide-8
SLIDE 8

3- The Face Object

A Face contains a single pointer to an incident HalfEdge While a Face can be encloses in many HalfEdges, only a single pointer to one of them is needed Face {

HalfEdge* edge;

} To keep the structure consistent, we store a special infinite face

8

slide-9
SLIDE 9

Example

9

𝑤1 𝑤2 𝑤3 𝑤4 𝑔

𝑔

2

𝑔

1

slide-10
SLIDE 10

Traversals

Origin: Given a HalfEdge (𝑓), find its destination

𝑓 → 𝑢𝑥𝑗𝑜 → 𝑝𝑠𝑗𝑕𝑗𝑜

NextLeaving: Given a vertex (𝑤) and a HalfEdge (𝑓) leaving 𝑤, find the next leaving HalfEdge in CW order

𝑓 → 𝑢𝑥𝑗𝑜 → 𝑜𝑓𝑦𝑢

10