I have successfully installed the cgal-swig bindings and I can create either 2D or 3D triangulations as in the examples. The documentation and examples only use either a 2D or 3D triangulation.
However I have a set of 2.5D points being x,y,depth
. I want a 2D Delaunay triangulation with z/depth/height
being a property or attribute of the vertices. From my understanding, a Delaunay_triangulation_2
only takes 2D Points_2
objects and a Triangulation_3
generates tetrahedra and not triangles.
I think these solutions would almost solve my problems:
- CGAL 2.5D Triangulation Attach vertex info
- Retrieve z from a constrained delaunay triangulation of Projection_traits_xy_3
- Constrained delaunay triangulation with Projection_traits_xy_3
However, the proposed solutions are in C++ (which I do not understand). Is it possible to use the same approach using projection_traits_xy_3
using the cgal-swig
bindings in Python? Or is there another way I can (efficiently) link a collection of CGAL Point_2 to a lookup table with more information? In the end I would be using it for e.g. terrain interpolation etcetera.