440 likes | 652 Views
Flip - Flop. : Convex Hull construction via Star-Shaped Polyhedron in 3D. Mingcen Gao Thanh -Tung Cao Tiow-Seng Tan Zhiyong Huang. Outline. Flips on 3D polyhedron. Flip-Flop: a novel flip algorithm. ffHull : 3D convex hull algorithm. Experiments. 1.
E N D
Flip- Flop : Convex Hull construction via Star-Shaped Polyhedron in 3D Mingcen Gao Thanh-Tung Cao Tiow-Seng Tan Zhiyong Huang
Outline Flips on 3D polyhedron Flip-Flop: a novel flip algorithm ffHull: 3D convex hull algorithm Experiments
1 Flips on 3D polyhedron Convex Hull in 3D Convex Hull • Fundamental problem in CG • Collision detection • Path planning • CGAL (CPU) • qHull (CPU) • gHull (GPU) [Gao et al. 2012]
1 Flips on 3D polyhedron Compute CH by flips non-extreme points reflex edges 3-1 flip 2-2 flip 3-1 Edge 2-2 Edge Flips ?
1 Flips on 3D polyhedron Avoid self-intersection Difficulty 1: Avoiding self-intersection one flip 2D illustration Solution: star-shaped polyhedron
1 Flips on 3D polyhedron Avoid self-intersection Star-shaped polyhedron s 2D 3D In star-shaped polyhedron, checking whether a flip creates self-intersection is a local operation.
1 Flips on 3D polyhedron Break the stuck case Difficulty 2: Getting stuck by Lawson’s flip algorithm Flipping any reflex edges creates self-intersection. Solution: Flip-Flop (for star-shaped polyhedron)
Outline Flips on 3D polyhedron Flip-Flop: a novel flip algorithm ffHull: 3D convex hull algorithm Experiments
2 Flip-Flop: a novel flip algorithm An example b a b a d d e e f f c c a b d e p p f • non-extreme point c b a b a d d e e p f f c c p p
2 Flip-Flop: a novel flip algorithm An example Convex hull Volume Local optimum flip flop Lawson’s flip Flip-Flop Flips
2 Flip-Flop: a novel flip algorithm Concepts Increase the volume Flip-Flop Star-shaped Polyhedron Convex hull Finding non-extreme points Remove non-extreme points
2 Flip-Flop: a novel flip algorithm Finding non-extreme points • ab is a 2-2 edge that is • reflex and unflippable d a b b (or a) lies inside the tetrahedron sacd (or sbcd) c b (or a) is non-extreme s
2 Flip-Flop: a novel flip algorithm Flipping criteria Increases the Volume of the polyhedron by flipping reflex edges. (Used in Lawson’s flip algorithm) V-Criterion Decreases the Degree of the non-extreme (NE) vertices by flipping the edges incident to them D-Criterion For any non-extreme point, there is a 2-2 flippable edge incident to it! degree(v)=5 degree(v)=4 degree(v)=3 degree(v)=0
2 Flip-Flop: a novel flip algorithm Flipping criteria • Combination of V- and D- criterion If a or b is known non-extreme, flip the edge (D-criterion). d If c or d is known non-extreme, keep the edge (D-criterion). b a Otherwise flip the edge if it is reflex (V-criterion). c Use the index of the points to avoid flipping back and forth
2 Flip-Flop: a novel flip algorithm GPU implementation while it is not convex hull ▲ ▲ ▲ ▲ ▲ ▲ ▲ 1. identify and label the non-extreme points. 2. If no edge need be flipped, stop the thread. ▲ ▲ ▲ △ ▲ ▲ △ use atomic minimum operation to label the triangles in the flip ▲ ▲ ▲ ▲ ▲ ▲ ▲ Flip the edge if the triangles in the flip is labeled by the thread.
Outline Flips on 3D polyhedron Flip-Flop: a novel flip algorithm ffHull: 3D convex hull algorithm Experiments
3 ffHull: 3D convex hull algorithm Algorithm Construct initial tetrahedron using 4 extreme points, and use its center as the kernel Apply Flip-Flop s s s s Point set Insert the furthest point to grow the polyhedron and keep the star-shaped property.
2 ffHull: 3D convex hull algorithm GPU implementation while it is not convex hull ▲ ▲ ▲ ▲ ▲ ▲ ▲ ● ● ● ● ● ● ● ● ● ● ● ● ● If the triangle are associated with some points, insert the furthest one. ▲ ▲ ▲ △ ▲ ▲ △ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ ▲ Update the associated triangle of the point if needed.
3 ffHull: 3D convex hull algorithm Extensions • ffRT: 2D regular triangulation algorithm Point set Lift points by z=x2+y2-w Compute lower hull • Compute many convex hulls concurrently Point set 1 … … … … … Point set n Tetrahedron Apply ffHull on all groups
Outline Flips on 3D polyhedron Flip-Flop: a novel flip algorithm ffHull: 3D convex hull algorithm Experiments
4 Experiments • Machine: • Intel i7 2600K 3.4GHz CPU • 16GB of DDR3 RAM • Nvidia GTX 580 Fermi graphics with 3GB of video memory
4 Experiments Convex hull Cube 2.4x↑ v.s. gHull 18x↑ v.s. qHull 66x↑ v.s. CGAL Ball of radius 0.5 1.4x↑ v.s. gHull 20x↑v.s. qHull 81x↑v.s. CGAL Sphere (thickness 0.01) 1.3x↑ v.s. gHull 30x↑v.s. qHull 110x↑v.s. CGAL Box (thickness 0.01) 3.2x↑ v.s. gHull 23x↑ v.s. qHull 75x↑v.s. CGAL
4 Experiments Convex hull Thai statue Lucy 1.4x↑ v.s. gHull 5.5x↑v.s. qHull 12x↑v.s. CGAL 1.1x↑ v.s. gHull 7.2x↑v.s. qHull 17x↑v.s. CGAL
5 Conclusions is provably correct uses only local operations Flip-Flop GPU friendly allows any order of flips works for any star-shaped polyhedron ffHull ffRT GPU friendly GPU friendly
Thank you! mingcen@comp.nus.edu.sg http://www.comp.nus.edu.sg/~tants/flipflop.html
1 Flips on 3D polyhedron Compute CH by flips c c outside outside d d a a one flip b < 180° b > 180° inside inside Reflex Edge Convex Edge
1 Flips on 3D polyhedron • Star-shaped polyhedron s A polyhedron is star-shapedw.r.t. s if the cones of all its triangles do not overlap. The cone of abcw.r.t. s
1 Flips on 3D polyhedron • Star-shaped polyhedron c d a a d c b b s s Edge abis reflexif d and s lie on different sides of abc. Otherwise ab it is convex.
1 Flips on 3D polyhedron • Star-shaped polyhedron Edge abis flippablew.r.t. s if Point s remains inside after flipping. The union of the cones included in the flip is convex. a d b c d a s b c d a b s (1) (2) ab is flippable ab is unflippable c Flipping a flippable edge results in a star-shaped polyhedron w.r.t. s. s
2 Flip-Flop: a novel flip algorithm Algorithm yes Initial polyhedron all edges Queue of edges pop ab with link points {c,d} x∈{a,b,c,d} is the NE point with the minimum index no no Outdated? Flippable? x exists? yes no Label NE point Reflex? yes Apply V-criterion no Push edges Apply D-criterion yes Flip-Flop
2 Flip-Flop: a novel flip algorithm Correctness 2-2 reflex and unflippable edge → a non-extreme point v is non-extreme with degree 3 → 3-1 flippable edge v is non-extreme → v is locally covered correctness of Flip-Flop v is non-extreme with degree > 3 → an incident edge is 2-2 flippable 3-1 reflex edge → flippable
2 Flip-Flop: a novel flip algorithm Correctness 3-1 reflex edge → flippable a d b c Edge abis a 3-1 edge that is reflex, then the polyhedron is star-shaped w.r.t. s after flipping ab. s
2 Flip-Flop: a novel flip algorithm Correctness 2-2 reflex and unflippableedge → a non-extreme point • ab is a 2-2 edge that is • reflex and unflippable d a b b (or a) lies inside the tetrahedron sacd (or sbcd) c b (or a) is non-extreme s
2 Flip-Flop: a novel flip algorithm Correctness vis locally covered by b, e and f since it lies inside the cone of sb, se and sf. v is not locally covered. Cs(△bef) isacoverof v
2 Flip-Flop: a novel flip algorithm Correctness v is non-extreme → v is locally covered • Assume v is not locally covered • v and s must lie on the same side of C by assumption • Any vertex p other than v must lie inside RT, otherwise the polyhedron is not star-shaped • Construct convex hull C of the link points of v. • t1 and t2 are two triangles on C intersecting with vs. • (t1 is nearer to s and v than t2) • H passes s and is parallel t1. • RT is the half-space by H containing C • v is an extreme point, contradiction!
2 Flip-Flop: a novel flip algorithm Correctness v is non-extreme with degree 3 → 3-1 flippable edge • Assume va is unflippable • s is inside the tetrahedron vabc • v is not locally covered • v is an extreme point, contradiction!
2 Flip-Flop: a novel flip algorithm Correctness v is non-extreme with degree > 3 → an incident edge is 2-2 flippable Task 1: find 3 special points in the link of v Let Cs(△abc) be a cover of v such that a, b and c are link points of v While another link point p is inside Cs(△abc), use p to replace one of {a, b, c} and get a smaller cover • Any vertex q other than v must lie outside Cs(△abc), otherwise the polyhedron is not star-shaped
2 Flip-Flop: a novel flip algorithm Correctness v is non-extreme with degree > 3 → an incident edge is 2-2 flippable Task 2: find the 2-2 flippable edge incident to v • a, b and c partition the link of v into three • chains of vertices: Lab, Lbcand Lca. • Let Dsva be the half-plane through v, s, a • defined by line vs, similar for Dsvc and Dsvb. • Let Rab be the region bounded by Dsva and • Dsvb and containing the edge ab. • W.l.o.g. let Lab be (a,p1,p2,…,pn,b), n>1. Goal: there exists a vertex pm in Lab so that so that edge vpm is 2-2 flippable
2 Flip-Flop: a novel flip algorithm Correctness v is non-extreme with degree > 3 → an incident edge is 2-2 flippable Task 2: find the 2-2 flippable edge incident to v • Labcannot intersect with Dsva, Dsvb and Dsvc for the star-shaped polyhedron. • Lablies totally inside Rab • Lablies outside Cs(△abc) (task 1). • In the convex hull of {sv, sa, sp1, … spn, sb }, there must be a vertex pm on its boundary. • Edgevpmis 2-2 flippable
3 ffHull: 3D convex hull algorithm Implementation tips Adapt the exact 3D orientation predicate [Shewchuk 97’] and SoS technique [Edelsbrunner 90’] to promise the robustness. Maintain the orientation of each triangle so that the kernel point s is always beneath it. Use orientation determinants when finding the furthest point. In GPU, find an almost furthest point without using atomic operations In GPU, separate the kernels for fast and exact predicates.
4 Experiments Convex hull Cube Ball Sphere Box Running time of ffHull compared to gHull, CGAL (on the CPU) and gHull (on the GPU).
4 Experiments Convex hull Points on a thin sphere of different thicknesses.
4 Experiments Convex hull The number of flips performed by ffHull on the CPU.
Thank you! mingcen@comp.nus.edu.sg http://www.comp.nus.edu.sg/~tants/flipflop.html