Download presentation
Presentation is loading. Please wait.
Published byKaren Norris Modified over 9 years ago
1
1 Note on QEM Implementation
2
2 Algorithm Summary
3
3 2D Version Think clearly on how 2D is done and extrapolate how this will be done in 3D
4
4 Required on Data Structure Vertex Pos List edges List pairs … ?! Edge Vertex v1, v2 Preparation: Modify your sketch with the proposed data structure Able to remove points on contour
5
5 Visualizing Ellipsoids
6
6 Visualizing Q Center of ellipse: Reference
7
7 Q for Initial Vertices l 1 : a 1 x+b 1 y+c 1 =0 l 2 : a 2 x+b 2 y+c 2 =0 v d 2 (v,l 1 ) = (a 1 x+b 1 y+c 1 ) 2 = (p 1 T v) 2 = v T (p 1 p 1 T ) v d 2 (v,l 2 ) = … = v T (p 2 p 2 T ) v Q (v) = v T (p 1 p 1 T + p 2 p 2 T ) v
8
8 Error Metric at Vertices
9
9 Optimal Position of V
10
10 Valid Pairs (1:edge) v1v1 v2v2 Q 1 =Q(v 1 ) Q2Q2 For each edge (v 1 v 2 ): Compute v-bar from Q 1 and Q 2 Evaluate the contracting cost: v T (Q 1 +Q 2 )v
11
11 Valid Pair (2: aggregation) C(n,2) to select the pair whose distance is less than v1v1 v2v2 Q1Q1 Q2Q2 Computation of v-bar and cost: same as case 1
12
12 Info Stored in a Pair (v1,v2, Q1, Q2, v-bar, cost) Sorted by cost value (start contracting from minimum cost) More than one pair may be associated with the same vertex When a vertex is changed, updates need to be done …
13
13 Example: update v 1,Q 1 v 2,Q 2 v 3,Q 3 Pair contraction
14
14 Example: update v 1,Q 1 v 2,Q 2 v 3,Q 3 v 1, Q 1 +Q 2
15
15 Example: update v 3,Q 3 v 1, Q 1 +Q 2 Update all pairs involving v1
16
16 Iteration Least cost pair: v1 to stay, v2 to die Update v1 position New Q for v1 = Q1+Q2 Replace occurrence of v2 in all edges of v2 as v1 [doubly link] make v1 aware of these new edges remove degenerate edge (for case1) Update the pairs involving v1 v1v1 v2v2 Q1Q1 Q2Q2 v3v3 Q3Q3
17
17 Numerical Example L1: y-5=0 L2: x+y-8 = 0 L3: x-5=0 (3,5) (5,3) l1l1 l2l2 l3l3 v1v1 v2v2
18
18 Example (cont) (3,5) (5,3) l1l1 l2l2 l3l3 v1v1 v2v2
19
19 Line Equation Thru Two Pts Reference
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.