简体   繁体   中英

How do I triangulate an irregularly shaped lattice?

I have a list of XYZ-points that are arranged in an evenly spaced lattice in the XY-plane like so (for example):

点阵排列成格子

I want to 'tile' the space between these points with triangles that connect a point to two of its immmediate (up to) eight neigbors, like so:

与以前相同的点格,但现在用三角形平铺

How do I efficiently go about doing this in Python? A naive approach would check every point for eight possible triangles, but this is hugely inefficient due to considering many many duplicate triangles. Doing something like considering the possible triangles in the lower-right corner for each point, will miss some triangles. Is there some general algorithm for this problem?

I believe Delaunay triangulation is not appropriate, as it will always create a convex triangulation.




Context

This triangulation is a step in the process of generating 3D-meshes of buildings from LIDAR height-data. When I use the 'usual' algorithms for generating meshes from point clouds (poisson, pivoting ball), I end up with meshes that have a number of holes in them (especially at steep inclines like towers or walls). I hope I can fix a lot of these hole problems by recognizing that the point cloud forms an evenly spaced lattice in the XY-plane and triangulating it from that perspective as described above.

本地教会的点云高度数据 从上面看到的地方教堂的点云的一部分

Consider each 2x2 subgrid where at least three of the points a , b , c , d exist.

a b

d c

To get a triangulation like the one you depicted, test whether there are only three points. If so, put a triangle consisting of those three points. Otherwise, put triangles abc and acd .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM