I want to triangulate a polygon (without selfintersection, but with holes and the polygon can also be concav).
In this question (e.g.):
Delaunay triangulating the 2d polygon with holes
a Constrained Delaunay Triangulation is proposed.
What I was wondering about: is this the best way to do so or is it like "using a sledge-hammer to crack a nut"? An alternativ would be to use an algorithm for creating a "normal" triangulation (eg splitting the polygon in y-monoton parts and triangulate these parts) and flipping the edges afterwards. But it seams that (nearly) nobody takes this solution. Is there a reason?
What are the pros and cons for one of these solutions?
(the polygons can have an arbitrary size)
There are a few reasons to prefer (constrained) Delaunay triangulations to other approaches:
In R^2 it can be proven that such a triangulation is the "best" way to triangulate a given geometry -- resulting in a triangulation that maximises the minimum angle. This is equivalent to producing triangles of optimal quality, without any "skinny" elements.
Forming the Delaunay triangulation is efficient (i.e. O(n*log(n)) in R^2).
Delaunay triangulation algorithms are robust and efficient in practice. A number of very high quality implementations exist, such as Triangle and CGAL.
Delaunay triangulations generalise to higher-dimensional problems (i.e. tetrahedrons in R^3 and general simplexes in R^d).
Delaunay triangulations induce an orthogonal dual complex (i.e. the Voronoi diagram). This can be important for certain classes of numerical methods.
Depending on what exactly you're looking to achieve, you might find one or more of these criteria persuasive. Other options, such as ear-clipping or monotone slab triangulation, can be competitive in some areas, but don't, IMO, exhibit the same kind of overall performance.
You can try alpha shapes. It is defined as a delaunay triangulation without edges exceeding alpha.
Related
I understand how to use delaunay triangulation in 2d points?
But how to use delaunay triangulation in 3d points?
I mean I want to generate surface triangle mesh not tetrahedron mesh, so how can I use delaunay triangulation to generate 3d surface mesh?
Please give me some hint.
To triangulate a 3D point cloud you need the BallPivoting algorithm: https://vgc.poly.edu/~csilva/papers/tvcg99.pdf
There are two meanings of a 3D triangulation. One is when the whole space is filled, likely with tetrahedra (hexahedra and others may be also used). The other is called 2.5D, typically for terrains where the z is a property as the color or whatever, which doesn't influence the resulting triangulation.
If you use Shewchuk's triangle you can get the result.
If you are curious enough, you'll be able to select those tetrahedra that have one face not shared with other tetrahedra. These are the same tetrahedra "joined" with infinite/enclosing points. Extract those faces and you have your 3D surface triangulation.
If you want "direct" surface reconstruction then you undoubtly need to know in advance which vertices among the total given are in the surface. If you don't know them, perhaps the "maxima method" allows to find them out.
One your points cloud consists only of surface vertices, the triangulation method can be any one you like, from (adapted) incremental Chew's, Ruppert, etc to "ball-pivoting" method and "marching cubes" method.
The Delaunay tetrahedrization doesn't fit for two reasons
it fills a volume with tetrahedra, instead of defining a surface,
it fills the convex hull of the points, which is probably not what you expect.
To address the second problem, you need to accept concavities, and this implies that you need to specify a reference scale that tells what level of detail you want. This leads to the concept of Alpha Shapes, which are obtained as a subset of the faces.
Lookup "Alpha Shape" in an image search engine.
Alexandre,
I am interested in using (and possibly implementing) software for (constained) 3d tetrahedralization and so I was concerned when I saw your comment:
"3D delaunay (I assume you want tetrahedra, not that you're trying to fit a surface) is very very very very ill conditioned and almost impossible to get right robustly. Actually, the problem is less with the algorithm than with the typical data which is fed to it. – Alexandre C. Feb 4 '11 at 14:20"
Can you possibly elaborate on why you feel that 3d delaunay is so ill-conditioned? In particular, could you point me to a reference so that I can read on it myself?
Thanks,
Dan L.
The problem is that in the input points, there can easily be five points that are almost co-spherical, and for those points, the insphere predicate of the Delaunay triangulation is difficult to evaluate.
Actually, not so difficult. The following article Efficient Exact Geometric Predicates for Delaunay Triangulations explains how it is implemented in the 3D Delaunay triangulation of CGAL: the article explains how the predicates can be computed exactly, with filters that ensure the efficiency in non-degenerated cases.
I have a collection of points in R^3 with a Euclidean distance metric. I would like to construct a graph with each point represented by a node, and edges only between points with distance d < r, where r is some cutoff value.
Searching stackoverflow yielded an interesting solution: to compute the Delaunay triangulation of the data points, and then to remove edges longer than the threshold distance.
(source: 3D Connected Points Labeling based on Euclidean distances)
Are there other ways to do this that are more efficient?
Also, what is an efficient way of removing edges longer than the cutoff distance?
If not, does anyone know of a Delaunay triangulation implementation in Python?
edit: nevermind the last question, matplotlib can do the triangulation, scipy for 3d.
Thanks.
PS - somewhat related: since the Delaunay triangulation is the dual graph of the Voronoi diagram, and k-means clustering splits space into Voronoi cells, is the method described here the same (or closely related to) k-means clustering? I'm a beginner in machine learning algorithms so I would love some expert feedback on this.
Your result may be the complete graph, so a Delaunay triangulation won't help. But you can use a kD-Tree.
http://en.wikipedia.org/wiki/K-d_tree
I have searched the whole internet and scientific databases for a paper on Delaunay Triangulation of monotone Polygons. I'm not searching for arbitrary Triangulation of Polygons, only for Delaunay triangulation. Does anybody know such a publication, where monotone Polygons are Delaunay triangulated? Thx!
Delaunay triangulation applies to a set of points, not to a given shape (such as a polygon).
You're looking for constrained delaunay triangulation if you have a specific shape to triangulate...
I implemented the Bowyer-Watson algorithm, with constraints to delaunay-triangulate a given polygon (not necessarily monotone).
My implementation is a part of OgreProcedural.
I read the following papers on the subject before implementing it :
http://www.geom.uiuc.edu/~samuelp/del_project.html
http://www.cg.tuwien.ac.at/hostings/cescg/CESCG-2004/web/Domiter-Vid/
I'm working on a path planning algorithm that is equivalent to a traveling salesman problem. I don't know how many nodes I might have so I'm willing to sacrifice accuracy for speed. My problem can be modeled as a fully connected graph, with the cost of transitioning between nodes being related to more than just the distance between nodes. I'd like to restrict my search space to connections that lie on the delaunay triangulation (the research I've read notes that 95-100% of connections in solutions to the TSP lie on the delaunay triangulation) but since my graph cannot be expressed as 2D or even 3D geometry, I can't directly use it in my representation. Is there an algorithm that results in an equivalent triangulation to the delaunay triangulation that applies to graphs that do not conform to a geometric representation (cost of connections cannot be expressed as a geometric distance between points due to over-constraint)?
For n-dimension you can try a gray code.