I am looking for constrained triangulation code in matlab, similar to Shewchuk's triangle software. The main thing matlab's delaunay is missing is constraints, such as constraints on the minimum angle of the mesh etc.

I heard there's a port for Shewchuk's code to matlab using mex, but I couldn't find it.

有帮助吗?

解决方案

Here's GUI written for MATLAB, that uses external calls to Shewchuk's Triangle.c:

http://marineemlab.ucsd.edu/~kkey/software/triangle/index.php

Maybe you can use that.

其他提示

I recommend Matlab's DelaunayTri(...,C) where C is the constraint edges in a numEdge x 2 matrix. Edges are specified with 2 indices into the set of triangulation points.

Output is object with a DelaunayTri class.

http://www.mathworks.com.au/help/techdoc/ref/delaunaytri.html

To filter out the triangles inside or outside the constraints use "inOutStatus()"

e.g.

dt = DelaunayTri(double(Points), double(Constraints));
outside = ~ dt.inOutStatus();
%filter using TriRep to create a new set of triangles, "tr"
tr = TriRep(dt(outside, :), dt.X);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top