-2

I'm implementing Bowyer-Watson point insertion algorithm and I'm wondering if there is any better way to fix neighbor relationship of newly created tetrahedron after a point is inserted.

One possible solution may be every tetrahedron that sharing the inserted point search its neighbor by comparing if there are 3 points are same between two tetrahedrons. But this solution seems slow, I don't know how CGAL implement this. Any ideas?

UPDATE:

the pseudocode of Bowyer-Watson: http://en.wikipedia.org/wiki/Bowyer%E2%80%93Watson_algorithm

Wood
  • 945
  • 1
  • 9
  • 18
  • Do you want to insert points into an existing mesh? – Micromega Nov 09 '14 at 16:02
  • What dimension are you considering? – sloriot Nov 09 '14 at 18:36
  • @sloriot: I must be in 3D, otherwise Wood would speak about tetrahedra. – lrineau Nov 10 '14 at 10:52
  • @Phpdna, yes, I'm inserting points into a existing Delaunay mesh – Wood Nov 10 '14 at 13:45
  • @sloriot, it's 3D, I know how to fix neighbor relationship in 2D in constant time. But 3D is much more complex. – Wood Nov 10 '14 at 13:46
  • @lrineau, yes it's in 3D, you have any ideas? – Wood Nov 10 '14 at 13:47
  • @Wood:Can you elaborate? Most likely add some code? Thanks a lot! – Micromega Nov 10 '14 at 13:52
  • @Wood:Isn't this the same method:http://books.google.fr/books?id=krS2kS0sZbkC&pg=PA612&lpg=PA612&dq=how+to+insert+point+into+delaunay+mesh&source=bl&ots=ZToTurEZS4&sig=TNO4lJcPVSo5TYZD6mmYm2DcB24&hl=de&sa=X&ei=8sRgVNu2LoOBPaeqgIAK&redir_esc=y. – Micromega Nov 10 '14 at 14:03
  • @Phpdna: I currently don't have any code, so I updated the pseudocode provided by wiki. The method you provide is based on Bowyer-Watson method but it's more complecated and it's Delaunay refinement algorithm, I don't need to refine the mesh, I just need to get a Delaunay mesh. – Wood Nov 11 '14 at 02:08
  • What is done in CGAL is collect all cells having the point in their Delaunay ball, remove them from the mesh and join all boundary facet of the hole with the new point (one new cell per facet). – sloriot Nov 12 '14 at 09:43
  • @sloriot, yes, the point is, after joinning all boundary facet of the hole with the new point, how does CGAL connect these new tetrahedrons? Does CGAL hold a list of the new tetrahedrons and connect them by searching for every pair of tetrahedrons that have 3 same points(a same facet)? Or CGAL has a better way to connect them? – Wood Nov 13 '14 at 01:34
  • @Wood:The bw maintaions a thing like half-edges data structure.Maybe you confused edges with another thing?! – Micromega Nov 13 '14 at 11:37

1 Answers1

0

In my opinion your algorithm and the bowyer-watson incremental are the fastest. You can try a point-in polygon test but its very complicated. For example you can search for rectangles and then use a point-in polygon test. Or you can try hierarchical point-in-polygon like the kirkpatrick data structure but it's a very difficult problem.

Micromega
  • 12,486
  • 7
  • 35
  • 72
  • I think you may missunderstand my meaning. I want to know how to fix the neighbor relationship between tetrahedron, that's my point. Thanks any way. – Wood Nov 12 '14 at 03:01
  • @Wood:Can you define neighbor relationship? Why fix it? – Micromega Nov 12 '14 at 09:39
  • When you search for tetrahedrons whose Delaunay ball contains the inserted point, you don't test every tetrahedron in the mesh for it's too slow. On the contrary, find out which tetrahedron the point lies in, and then iterately search for the neighbor tetrahedrons whose Delaunay ball contains the point, this is the right way to do it. So, keeping the right neighbor relationship is very important, you can find all 4 neighbor tetrahedrons that share each 1 facet of the current tetrahedron. – Wood Nov 13 '14 at 01:41
  • @Wood:IMO you overthink it. Sorry, I can't explain you better. Start some practice and learn from trial-and-error. – Micromega Nov 13 '14 at 11:06
  • @Wood:BTW in the worst case the bw algorithm doesn't test all edges. That the delaunay ball thing. IMO the algo works recursively so there is also possible to start from the super triangle but that not neeeded. – Micromega Nov 13 '14 at 11:13
  • @Wood:If my answer is helpful please consider to accept it. – Micromega Dec 17 '14 at 11:30