Presentation is loading. Please wait.

Presentation is loading. Please wait.

Algorithm3. (3-dim) Assumptions Points are ordered in a sequence increasingly with respect to the x coordinate. Points having the same x coordinate are.

Similar presentations


Presentation on theme: "Algorithm3. (3-dim) Assumptions Points are ordered in a sequence increasingly with respect to the x coordinate. Points having the same x coordinate are."— Presentation transcript:

1 Algorithm3. (3-dim) Assumptions Points are ordered in a sequence increasingly with respect to the x coordinate. Points having the same x coordinate are cleared to the vertices of their convex hull. Algorithm is incremental (inductive): at the step k+1 the (k+1) st point A k+1, as well as the convex hull C k of the previous points, are used to produce the convex hull C k+1 of the first k+1-points. (Exercise 10 = Implementation of algorithm 3)

2 Storing data of C k. Edges are oriented, i.e. for each edge we store a pair of oriented edges. For each (oriented) edge e A,B we store: Coordinates of its origin (A), Pointer to the opposite edge e B,A, (function Twin(e A,B )), Pointer to the facet “left of” e A,B (function Left (e A,B )), Pointer to the edge of this facet which ends at its origin (Prev (e A,B ) ). For each vertex A we store an: Edge which originates at A. For each facet we store a Pointer to its edge (appropriately oriented). Algorithm3. (cont.)

3 Example: A B CD E A B... e A,B e C,D... G F A ABG Origin()Twin() Prev() Left() CBCDG (X A,Y A,Z A ) (X B,Y B,Z B ) Out()... e C,D Algorithm3. (Storing data cont.) e B,A e G,A e D,C e B,C e D,C BCDG e A,B e B,A

4 Algorithm3. (cont.) Vertices of the vertex figure: e 1 =e A,B = Out(A) e 2 =e A,G =Twin(Prev(e 1 )) e 3 =e A,F =Twin(Prev(e 2 )) e 4 =e A,E =Twin(Prev(e 3 )) e 5 =e A,C =Twin(Prev(e 4 )) Edges of the vertex figure: Left(e 1 ), Left(e 2 ), Left(e 3 ), Left(e 4 ), Left (e 5 ) A B CD E G F Vertex Figure of A:

5 Step k+1. 1. Find the (space) polygon H k of edges of C k which divide the “visible” and the “invisible” part of C k with respect to (“from”) the point A k+1. A k+1 A k A 2 A 0 A 4 A 3 A 5 Algorithm3. (cont.) A 1 X

6 1.1 Start with the vertex figure V k = e 1 e 2 …e r of A k. A k is the last previously added point, the closest to A k in C k, therefore visible! Starting with the edge e 1 = Out (A k ) of C k (a “vertex” of V k ) we go counterclockwise (in + direction) around V k and check if the facets (“edges” of V k ) are visible. The visibility of the facet with edges e i and e i+1 is checked similarly as in 2 dimensions by the sine of a the mixed product [ e i, e i+1, A k A k+1 ] ( > 0  visible). Algorithm3. (step k+1 cont.) During the construction of H k, all visible facets, verteces and edges will be deleted except the vertices and edges of H k. eiei e i+1 A k+1 A k

7 1.1.1 All facets in V k are visible. We delete all these facets, all their edges* and the vertex A k. The remaining edges of deleted facets are stored in a set R k **. (At each original edge e A,B, a pointer R (e A,B ) to its duplicate in R k is stored, and vice versa.) Algorithm3. (step k+1 cont.) eiei e i+1 A k * both ± directed edges incident to A k ** R k is a cycle of oriented edges. R k will evolve in H k ! R kR k

8 1.1.2 Some facets in V k are not visible. We delete all visible facets and all their edges. Now vanish some pairs ± e i (bordering two visible neighbors), some pairs ± e i remain, and vanish exactly two singles (bordering a visible and an invisible neighbor) h 1 and h 2. Their twins -h 1 and -h 2 are the first edges of H k, A k the first vertex. The set R k is defined the same way as in 1.1.1. Algorithm3. (step k+1 cont.) eiei e i+1 A k R kR k

9 1.m+1 Inductively, at any vertex X of the cycle R k not already used in some step 1.x., perform a step 1.m+1.1 / 1.m+1.2 similar to the step 1.1.1 / 1.1.2. The visible facets around X and their edges will be deleted. Two (left fig. ) or one (right fig.) edge of R k will be replaced with a sequence of undeleted edges of deleted facets, and the cycle R k will be updated. Algorithm3. (step k+1 cont.) X X

10 If all the vertices of R k are already visited, then H k = R k 2. Add the edges and the facets which connect A k+1 with the vertices and the edges of H k. A k+1 A k A 2 A 0 A 4 A 3 A 5 A 1 A k+1 A k A 2 A 0 A 4 A 3 A 5 A 1

11 If A k+1 is in the plane of some facet f of C k, we “glue” the corresponding triangles to this facet. A k+1 f 3. Deal with degeneracy (special cases). Algorithm3. (step k+1 cont.)


Download ppt "Algorithm3. (3-dim) Assumptions Points are ordered in a sequence increasingly with respect to the x coordinate. Points having the same x coordinate are."

Similar presentations


Ads by Google