Triangulate a set of points with a concave domain

前端 未结 6 1397
闹比i
闹比i 2021-02-14 02:47

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 li

6条回答
  •  粉色の甜心
    2021-02-14 03:18

    A simple but elegant way is to loop over the triangels and check wether they are within our domain or not. The shapely package could do the trick for you.

    for more on this please check the following post: https://gis.stackexchange.com/a/352442 Note that triangulation in shapely is also implemented, even for MultiPoin objects.

    I used it, the performance was amazing and the code was only like five lines.

提交回复
热议问题