Open sweco-sekrsv opened 4 years ago
The problem in 3D space is quite a bit more complicated than on a single plane. While technically one can calculate the area of a triangle in 3D space with nearly as much ease as 2D, the surface itself depends on the points chosen. At a first glance I think this would be far more complicated than this library would provide.
However, for this class of problem in 3D you might want to look into Delaunay triangulation:
https://www.youtube.com/watch?v=63MM0EqXlT0
See also SciPy's implementation:
https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.spatial.Delaunay.html
Hi! Is it possible to add a third dimension to the function?(z height) Something like: polygon = [(0,1,2), (-1, 0, 2.5), (0, -1, 2.5), (1, 0, 2)]
I tried it but get the error: triangles = tripy.earclip(polygon)