3d delaunay triangula on
play

3D Delaunay Triangula.on Libin Lu, Weijing Liu, Zhuoheng Yang - PowerPoint PPT Presentation

3D Delaunay Triangula.on Libin Lu, Weijing Liu, Zhuoheng Yang Delaunay Triangula.on In 2-D, a Delaunay triangula.on for a set P of points in a


  1. 3D ¡Delaunay ¡Triangula.on � Libin ¡Lu, ¡Weijing ¡Liu, ¡Zhuoheng ¡Yang �

  2. Delaunay ¡Triangula.on � In ¡2-­‑D, ¡a ¡Delaunay ¡triangula.on ¡for ¡a ¡set ¡P ¡of ¡points ¡in ¡a ¡plane ¡is ¡a ¡triangula.on ¡ DT(P) ¡such ¡that ¡no ¡point ¡in ¡P ¡is ¡inside ¡the ¡circumcircle ¡of ¡any ¡triangle ¡in ¡DT(P). [1] ¡ ¡ In ¡3-­‑D, ¡a ¡Delaunay ¡triangula.on ¡for ¡a ¡set ¡P ¡of ¡points ¡in ¡space ¡is ¡a ¡triangula.on ¡ DT(P) ¡such ¡that ¡no ¡point ¡in ¡P ¡is ¡inside ¡the ¡circumsphere ¡of ¡any ¡tetrahedron ¡in ¡ DT(P). � [1] ¡hIp://en.wikipedia.org/wiki/Delaunay_triangula.on �

  3. Bowyer–Watson ¡Algorithm � The ¡Bowyer–Watson ¡algorithm ¡is ¡an ¡incremental ¡algorithm. ¡It ¡works ¡by ¡ adding ¡points, ¡one ¡at ¡a ¡.me, ¡to ¡a ¡valid ¡Delaunay ¡triangula.on ¡of ¡a ¡subset ¡of ¡ the ¡desired ¡points. ¡ASer ¡every ¡inser.on, ¡any ¡triangles ¡whose ¡circumcircles ¡ contain ¡the ¡new ¡point ¡are ¡deleted, ¡leaving ¡a ¡star-­‑shaped ¡polygonal ¡hole ¡which ¡ is ¡then ¡re-­‑triangulated ¡using ¡the ¡new ¡point. ¡[2] � [2] ¡hIp://en.wikipedia.org/wiki/Bowyer%E2%80%93Watson_algorithm �

  4. Bowyer–Watson ¡Algorithm � The ¡Bowyer–Watson ¡algorithm ¡is ¡an ¡incremental ¡algorithm. ¡It ¡works ¡by ¡ adding ¡points, ¡one ¡at ¡a ¡.me, ¡to ¡a ¡valid ¡Delaunay ¡triangula.on ¡of ¡a ¡subset ¡of ¡ the ¡desired ¡points. ¡ASer ¡every ¡inser.on, ¡any ¡triangles ¡whose ¡circumcircles ¡ contain ¡the ¡new ¡point ¡are ¡deleted, ¡leaving ¡a ¡star-­‑shaped ¡polygonal ¡hole ¡which ¡ is ¡then ¡re-­‑triangulated ¡using ¡the ¡new ¡point. ¡[2] � [2] ¡hIp://en.wikipedia.org/wiki/Bowyer%E2%80%93Watson_algorithm �

  5. Bowyer–Watson ¡Algorithm � The ¡Bowyer–Watson ¡algorithm ¡is ¡an ¡incremental ¡algorithm. ¡It ¡works ¡by ¡ adding ¡points, ¡one ¡at ¡a ¡.me, ¡to ¡a ¡valid ¡Delaunay ¡triangula.on ¡of ¡a ¡subset ¡of ¡ the ¡desired ¡points. ¡ASer ¡every ¡inser.on, ¡any ¡triangles ¡whose ¡circumcircles ¡ contain ¡the ¡new ¡point ¡are ¡deleted, ¡leaving ¡a ¡star-­‑shaped ¡polygonal ¡hole ¡which ¡ is ¡then ¡re-­‑triangulated ¡using ¡the ¡new ¡point. ¡[2] � [2] ¡hIp://en.wikipedia.org/wiki/Bowyer%E2%80%93Watson_algorithm �

  6. Bowyer–Watson ¡Algorithm � The ¡Bowyer–Watson ¡algorithm ¡is ¡an ¡incremental ¡algorithm. ¡It ¡works ¡by ¡ adding ¡points, ¡one ¡at ¡a ¡.me, ¡to ¡a ¡valid ¡Delaunay ¡triangula.on ¡of ¡a ¡subset ¡of ¡ the ¡desired ¡points. ¡ASer ¡every ¡inser.on, ¡any ¡triangles ¡whose ¡circumcircles ¡ contain ¡the ¡new ¡point ¡are ¡deleted, ¡leaving ¡a ¡star-­‑shaped ¡polygonal ¡hole ¡which ¡ is ¡then ¡re-­‑triangulated ¡using ¡the ¡new ¡point. ¡[2] � [2] ¡hIp://en.wikipedia.org/wiki/Bowyer%E2%80%93Watson_algorithm �

  7. Bowyer–Watson ¡Algorithm � The ¡Bowyer–Watson ¡algorithm ¡is ¡an ¡incremental ¡algorithm. ¡It ¡works ¡by ¡ adding ¡points, ¡one ¡at ¡a ¡.me, ¡to ¡a ¡valid ¡Delaunay ¡triangula.on ¡of ¡a ¡subset ¡of ¡ the ¡desired ¡points. ¡ASer ¡every ¡inser.on, ¡any ¡triangles ¡whose ¡circumcircles ¡ contain ¡the ¡new ¡point ¡are ¡deleted, ¡leaving ¡a ¡star-­‑shaped ¡polygonal ¡hole ¡which ¡ is ¡then ¡re-­‑triangulated ¡using ¡the ¡new ¡point. ¡[2] � [2] ¡hIp://en.wikipedia.org/wiki/Bowyer%E2%80%93Watson_algorithm �

  8. Parallelism � 1. Each ¡task ¡represents ¡a ¡triangle ¡in ¡plane ¡containing ¡some ¡points. ¡ 2. Each ¡thread ¡tries ¡to ¡get ¡a ¡task ¡and ¡insert ¡points, ¡triangles ¡far ¡from ¡each ¡ other ¡can ¡perform ¡inser.on ¡at ¡the ¡same ¡.me. ¡ ¡

  9. Task ¡inser.on ¡kernel � Lock ¡the ¡vertex ¡of ¡task ¡triangle. �

  10. Task ¡inser.on ¡kernel � Lock ¡more ¡points, ¡all ¡the ¡vertex ¡of ¡the ¡triangles ¡whose ¡circumcircle ¡contain ¡ the ¡point ¡to ¡insert. �

  11. Task ¡inser.on ¡kernel � Manipulate ¡them, ¡create ¡new ¡triangles �

  12. Task ¡inser.on ¡kernel � Sort ¡remaining ¡points ¡into ¡new ¡triangles, ¡put ¡them ¡into ¡task ¡queue, ¡release ¡ the ¡locks. �

  13. Prevent ¡Deadlocks � Dead ¡lock? ¡ ¡ ¡ ¡-­‑ ¡If ¡lock ¡fail, ¡try ¡again ¡later! ¡ ¡ ¡ ¡-­‑ ¡Why ¡not ¡lock ¡vertex ¡in ¡indexing ¡order? ¡

  14. Using ¡TBB � Tree ¡style ¡rela.ons ¡between ¡tasks ¡ ¡ ¡ ¡-­‑ ¡Not ¡really ¡

  15. Using ¡TBB � Tree ¡style ¡rela.ons ¡between ¡tasks ¡ ¡ ¡ ¡-­‑ ¡Not ¡really ¡ Use ¡customized ¡task ¡queue, ¡draw ¡task ¡randomly ¡ from ¡queue. ¡

  16. Customized ¡Task ¡Queue � Consumer ¡ Producer ¡ Producer-­‑consumer ¡problem �

  17. Customized ¡Task ¡Queue � Producer ¡ Consumer ¡ Consumer ¡ Fetch ¡a ¡task ¡randomly �

  18. Customized ¡Task ¡Queue � Consumer ¡ Consumer ¡ Try ¡lock ¡fail! ¡ Try ¡lock ¡fail! ¡ Too ¡many ¡conflicts ¡if ¡tasks ¡are ¡highly ¡related. ¡ Starva&on ! �

  19. Customized ¡Task ¡Queue � Consumer ¡ Consumer ¡ Locked! ¡ J ¡ Try ¡lock ¡fail! ¡ Only ¡allow ¡one ¡consumer ¡if ¡there ¡are ¡too ¡few ¡tasks. �

  20. Memory ¡Locality ¡ Goal : ¡ Data ¡associated ¡with ¡an ¡inser.on ¡task ¡should ¡ shares ¡a ¡small ¡number ¡of ¡cache ¡lines, ¡which ¡ improves ¡data ¡locality. ¡ Ideas : ¡ 1. Ver.ces ¡that ¡are ¡spa.ally ¡related ¡should ¡also ¡ stay ¡close ¡in ¡memory.(done) ¡ 2. Maybe ¡compress ¡data(not ¡yet) ¡

  21. Spa.al ¡Sort ¡ Algorithm: ¡X-­‑Y-­‑Z ¡Cuts ¡ • 1. ¡Find ¡which ¡of ¡the ¡x,y,z ¡axes ¡has ¡the ¡greatest ¡ diameter. ¡ • 2. ¡Find ¡the ¡approximate ¡median(M) ¡of ¡D. ¡ • 3. ¡Par..ons ¡the ¡points ¡using ¡M. ¡ • 4. ¡Recursively ¡apply ¡X-­‑Y-­‑Z ¡Cuts ¡to ¡one ¡side ¡of ¡ the ¡points ¡first, ¡then ¡the ¡other. ¡ • (Sounds ¡like ¡Quicksort). ¡

  22. Spa.al ¡Sort ¡ Algorithm: ¡X-­‑Y-­‑Z ¡Cuts ¡(Example ¡in ¡2D) ¡ ¡

  23. Spa.al ¡Sort ¡ X-­‑Y-­‑Z ¡Cuts ¡(Before ¡sor&ng) ¡ ¡ Red:points[0-­‑9] ¡ Blue:points[10-­‑19] ¡ Green:points[20-­‑29] ¡

  24. Spa.al ¡Sort ¡ X-­‑Y-­‑Z ¡Cuts ¡(AEer ¡sor&ng) ¡ ¡ Red:points[0-­‑9] ¡ Blue:points[10-­‑19] ¡ Green:points[20-­‑29] ¡

  25. Spa.al ¡Sort ¡ X-­‑Y-­‑Z ¡Cuts ¡Op&miza&on ¡ • 1. ¡Inplace ¡sor.ng. ¡(minimize ¡temporary ¡memory ¡ alloca.on) ¡ • 2. ¡Parallel ¡sor.ng. ¡ • Key : ¡at ¡step ¡#4. ¡ • Recursively ¡apply ¡X-­‑Y-­‑Z ¡Cuts ¡to ¡one ¡side ¡of ¡the ¡ points ¡first, ¡then ¡the ¡other. ¡ • Recursively ¡apply ¡X-­‑Y-­‑Z ¡Cuts ¡to ¡ both ¡sides ¡of ¡the ¡ points ¡ concurrently . ¡

  26. Performance ¡With ¡Spa.al ¡Sort ¡ Points/Sec ¡ 10000 ¡ 8000 ¡ 6000 ¡ 4000 ¡ 2000 ¡ 0 ¡ 1 ¡thread ¡ 2 ¡threads ¡ 3 ¡threads ¡ 4 ¡threads ¡ Original ¡ Using ¡Spa.al ¡Sort ¡

  27. Conclusion � Difficult ¡to ¡parallel ¡3D ¡Delaunay ¡triangula.on ¡ ¡-­‑ ¡Because ¡of ¡complicated ¡data ¡dependencies ¡ ¡ More ¡difficult ¡to ¡achieve ¡high ¡efficiency ¡ ¡-­‑ ¡hard ¡to ¡distribute ¡irrela.ve ¡tasks ¡to ¡different ¡threads ¡

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend