delaunay

Erratic data cursor behavior for triangulated 3d surfaces in MATLAB R2011b

为君一笑 提交于 2019-12-10 19:11:20
问题 I'm seeing erratic behavior from the data cursor in MATLAB R2011b when applied to plots of triangulated 3d surfaces: Clicking on certain points selects completely different points instead. Example with a cylinder: [r, phi, h] = meshgrid(1, 0:pi/10:2*pi, 0:0.05:1); x = r.*cos(phi); y = r.*sin(phi); z = h; xyz = [x(:) y(:) z(:)]; tri = delaunay(xyz); trimesh(tri, xyz(:,1), xyz(:,2), xyz(:,3), ... 'LineStyle', 'none', 'Marker', '.', 'MarkerSize', 30) view(-37, 28) Then enable data cursor mode

What is the best initial shape for 3D Delaunay incremental algorithm?

社会主义新天地 提交于 2019-12-08 09:13:10
问题 I'm doing 3D Delaunay, with the incremental method. I've tested it in 2D with an initial triangle for inserting the vertices and it works great, but if I use a triangle for 3D, some vertices do not fall into any circumscribed sphere therefore they don't get inserted. I've tried with a tetrahedron but if the first node falls into the four of the faces, all vertices create new edges towards this new vertex, and deletes all of the initial triangles. 回答1: Whichever shape you take, you will always

Representing a LiDAR surface using the 3D Delaunay Triangulation as basis?

安稳与你 提交于 2019-12-08 03:14:58
问题 I would like to represent a surface, with 3D Delaunay Triangulation. The vertices must be my original input data, a LiDAR point cloud from an urban area. So, the surface must adjust/adapt the input information. Actually, what I need to do is the following: I have a 3D point cloud (x, y, z) from an urban area; I need to represent the surface of this area; I would like to do a 3D delaunay triangulation (I did with CGAL and I got the tetrahedrons) and identify only the triangles that represent

Delaunay from Voronoi with boost: missing triangle with non-integral point coordinates

梦想的初衷 提交于 2019-12-07 10:42:22
问题 Following this two resources: Boost basic tutorial SO Question I wrote a Delaunay triangulation with boost . It works fine if the points coordinates are integral (I generated several random tests and I did not observed error). However if the points are non integral I found many incorrect triangulations with missing edges or wrong edges. For example this image has been build with rounded value and is correct (see code below) But this image as been build with raw values and is incorrect (see

Filling triangles in Matplotlib triplot with individual colors

我与影子孤独终老i 提交于 2019-12-06 07:47:39
Is it possible to plot a list of triangles generated by scipy.spatial.Delaunay using pyplot's triplot function so that each triangle can be drawn and filled with an individual color? The basic python script I've created is import numpy as np import matplotlib.pyplot as plt from scipy.spatial import Delaunay import matplotlib.image as mpimg h = 300 w = 1000 npts = 30 pts = np.zeros((npts,2)) pts[:,0] = np.random.randint(0,w,npts) pts[:,1] = np.random.randint(0,h,npts) tri = Delaunay(pts) plt.xlim(0, w) plt.ylim(0, h) # Determine the color used for each triangle based upon the orthocenter # of

how to plot non-convex surface from set of n x 3 data

拜拜、爱过 提交于 2019-12-05 19:17:55
Is there a straight forward way to plot a non-convex surface in R? I have used something like the following for convex surfaces and it works fine: xyz <- cbind(y,x,z) tbr <- t(surf.tri(xyz, delaunayn(xyz))) rgl.triangles(xyz[tbr,1], xyz[tbr,2], xyz[tbr,3]) However, for non-convex surfaces, concave areas become filled. I think this is a problem with the function delaunayn() as it uses the Qhull library which does not support constrained Delaunay triangulations or mesh generation of non-convex objects. Any suggestions appreciated. P.S. I have data as an ascii file but it has 3 columns and is 225

Intersecting Volume in Matlab

匆匆过客 提交于 2019-12-05 05:56:07
问题 I have developed a code that takes a set of 3D coords, and performs triangulation to generate the convex hull/Delaunay . This has gone well and using the Deluanay triangulation I can test whether points are contained in a given volume using tsearchn. Now I want to take two of such 3D volumes, and test whether they intersect. Futhermore I would like to know what the percentage of volume A is intersected by Volume B. I think that I could generate a mesh grid of points that are within one of the

Delaunay triangulating the 2d polygon with holes

一个人想着一个人 提交于 2019-12-04 16:51:13
问题 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

Find the projection of a point on the convex hull with Scipy

☆樱花仙子☆ 提交于 2019-12-04 15:00:43
From a set of points, I'm getting the convex hull with scipy.spatial , either with Delaunay or ConvexHull (from the qhull library). Now I would like to get the projection of a point outside this convex hull onto the hull (i.e. the point on the hull that is the smallest distance from the point outside). This is the code I have so far: from scipy.spatial import Delaunay, ConvexHull import numpy as np hu = np.random.rand(10, 2) ## the set of points to get the hull from pt = np.array([1.1, 0.5]) ## a point outside pt2 = np.array([0.4, 0.4]) ## a point inside hull = ConvexHull(hu) ## get only the

Finding near neighbors

谁说胖子不能爱 提交于 2019-12-04 10:12:36
问题 I need to find "near" neighbors among a set of points. There are 10 points in the above image. Red lines are edges from the Delaunay Triangulation, black stars mark the mid-lines of the edges, blue lines are the Voronoi tesselation. Point 1 has three "near" neighbors, i.e. 4, 6, and 7, but not 2 and 3, who are almost in line with the edge 1-7, but much further away. What is a good way to identify the near neighbors (or "good" edges)? Looking at the figure, it seems to me that either selecting