delaunay

Triangulate a set of points with a concave domain

半腔热情 提交于 2019-12-04 06:15:44
Setup Given some set of nodes within a convex hull, assume the domain contains one or more concave areas: where blue dots are points, and the black line illustrates the domain. Assume the points are held as a 2D array points of length n , where n is the number of point-pairs. Let us then triangulate the points, using something like the Delaunay method from scipy.spatial: As you can see, one may experience the creation of triangles crossing through the domain. Question What is a good algorithmic approach to removing any triangles that span outside of the domain? Ideally but not necessarily,

Regularly spaced orthogonal grid Delaunay triangulation (Computing the paraboloid coeficients)

巧了我就是萌 提交于 2019-12-03 20:20:49
I'm trying to construct a Delaunay triangulation for the very specific case where the input x and y coordinates are orthogonal and relatively equidistant. Given the data size is relatively large (1000x1200 triangulation points) and that the Qhull algorithm doesn't know about my extra orthogonal condition, the triangulation is relatively slow (25 seconds on my machine). As such, I'd like to manually construct a Delaunay triangulation with each of my known quads subdivided into two triangles. I appreciate that this won't always result in a valid Delaunay triangulation (e.g. when the x and y step

How can I get a dictionary of cells from this Voronoi Diagram data?

眉间皱痕 提交于 2019-12-03 16:08:51
问题 Using the voronoi/delaunay diagram generation library found in this program, which is based on Fortune's original implementation of his algorithm, with a random set of points as input data, I am able to get the following output data: A list of the edges from the Delaunay Triangulation , meaning that for each input point, I can see which input points are its neighbors. They don't appear to be in any particular order. A list of the vertex pairs from the Voronoi Diagram , which I can use to draw

C++-ObjC OpenCV Constrained Delaunay

喜欢而已 提交于 2019-12-03 14:06:51
问题 I succesfully implemented a Delaunay triangulation of a contour in OpenCV 2.3.1. With cvPointPolygonTest I can get all the triangles in the convex hull, then I tried to perform another cvPointPolygonTest on triangles centroid to know if they are in the main contour or not , so I can have the constrained triangulation of the contour. But, it doesn't work well, as some triangles are (eg. with a walking man who has his two legs distant) 'over' a hole . Does anyone know a way to perform a

Interpolation with Delaunay Triangulation

拟墨画扇 提交于 2019-12-03 13:39:35
Having a cloud point shaped like some sort of distorted paraboloid, I would like to use Delaunay Triangulation to interpolate the points. I have tried other techniques (f.ex. splines) but did not manage to enforce the desired behavior. I was wondering if there's a quick way to use the results of scipy.spatial.Delaunay in a way where I can give the (x,y) coords and get the z-coord of the point on the simplex (triangle). From the documentation looks like I can pull out the index of the simplex but I am not sure how to take it from there. You can give the Delaunay triangulation to scipy

Delaunay triangulating the 2d polygon with holes

痴心易碎 提交于 2019-12-03 11:41:49
I want to triangulate the complex (but not self-intersecting) polygon with holes, so that resulting triangles all lay inside the polygon, cover that polygon completely, and obey the Delaunay triangle rules. Obviously, I could just build the Delaunay triangulation for all points, but I fear that some edges of the polygon will not be included into resulting triangulation. So, is such triangulation possible? And if yes, how can I do it? Just in case - I need it to construct the approximation of polygon medial axis (I hope it can be done via connecting all circumference points of resulting

python scipy Delaunay plotting point cloud

Deadly 提交于 2019-12-03 07:07:40
I have a pointlist=[p1,p2,p3...] where p1 = [x1,y1],p2=[x2,y2] ... I want to use scipy.spatial.Delaunay to do trianglation on these point clouds and then plot it How can i do this ? The documentation for the Delaunay is really scarce so far i have this code from subprocess import Popen, PIPE import os os.environ['point_num'] = "2000" cmd = 'rbox $point_num D2 | tail -n $point_num' sub_process = Popen(cmd, shell=True,stdout=PIPE,stderr=PIPE) output = sub_process.communicate() points = [line.split() for line in output[0].split('\n') if line] x = [p[0] for p in points if p] y = [p[1] for p in

Efficient Delaunay triangulation

点点圈 提交于 2019-12-03 04:06:59
问题 I'm looking for a .NET implementation which builds Delaunay triangulation from set of points. I have already tested couple of implementations but they all worked only for small amount of points (up to 20,000). I need something that can handle 500,000 points in reasonable time. 回答1: If you want to construct the 2D Delaunay triangulation, use Triangle.Net . It is a direct C# port of Shewchuk's famous Triangle program. 回答2: I was looking for the same thing and I found a C# 4.0 library called

C++-ObjC OpenCV Constrained Delaunay

坚强是说给别人听的谎言 提交于 2019-12-03 04:04:21
I succesfully implemented a Delaunay triangulation of a contour in OpenCV 2.3.1. With cvPointPolygonTest I can get all the triangles in the convex hull, then I tried to perform another cvPointPolygonTest on triangles centroid to know if they are in the main contour or not , so I can have the constrained triangulation of the contour. But, it doesn't work well, as some triangles are (eg. with a walking man who has his two legs distant) 'over' a hole . Does anyone know a way to perform a constrained triangulation. I thought about convexityDefects, but can't manage to understand how to begin with

Confusion on Delaunay Triangulation and Largest inscribed circle

流过昼夜 提交于 2019-12-01 11:01:20
I need to find a largest inscribed circle of a convex polygon, I've searched many sites and I get that this can be done by using Delaunay triangulation. I found a thread in CGAL discussion with an algorithm using CGAL: You can compute this easily with CGAL: First, compute the Delaunay triangulation of the points. Then, iterate on all the finite faces of the triangulation. For each finite face f compute its circumcenter c locate c in the triangulation (to speed up things, you can give one vertex of f as starting hint for the point location) if the face returned by locate(c,hint) is finite, then