artem-ogre / CDT

Constrained Delaunay Triangulation (C++)
https://artem-ogre.github.io/CDT/
Mozilla Public License 2.0
965 stars 125 forks source link

3D? #10

Closed cdcseacave closed 11 months ago

cdcseacave commented 4 years ago

Such a cool library, unfortunately only for 2D. Can't be generalized to 3D easily?

artem-ogre commented 4 years ago

Hi,

Do you mean creating constrained Delaunay tetrahedralizations? I don’t know how easy/complex such a generalization is, so any input and contributions are welcome. Do you have any good references or algorithm descriptions in mind?

Hypothetically since 3d versions of predicates are available, inserting points should be rather straightforward. Inserting constraints could be more difficult in 3d though.

Thanks for the interest and feedback.

cdcseacave commented 4 years ago

I am a simple user, I am not familiarized with the theory behind. I know TetGen implements it in 3D, and there is a paper describing it: http://doi.acm.org/10.1145/2629697

artem-ogre commented 4 years ago

Thanks, I will look into it. It definitely looks like it needs some effort. So I can't promise anything anytime soon. Leaving this issue open as any contributions are welcome.

anishsingh935 commented 3 years ago

hi can I work on this issue

artem-ogre commented 3 years ago

Thanks, @anishsingh935

Let me know if you need any help. Please be aware that this might be a sizable effort: up to a point that it makes more sense to have constrained tetrahedralization as a stand alone lib based on CDT. Perhaps CDT3D or CDTet :)

GenieTim commented 1 year ago

Hi @anishsingh935 , may I kindly ask: what is the status, where you able to progress, is there a CDT3D or CDTet now?

artem-ogre commented 1 year ago

@GenieTim To my knowledge nothing happened

xiaolong7 commented 1 year ago

Hi, can CDT be used for 2D triangulation of points in 3D space, like 3D surface reconstruction of point clouds?

artem-ogre commented 1 year ago

@xiaolong7 It can be used as long as you are reconstructing a TIN (2.5D) surface: when for each x,y there is only one height.

For example:

district10 commented 11 months ago

I'm looking for a way to triangulate a pointcloud. Here's an example:

A highway road surface:

https://github.com/artem-ogre/CDT/assets/5262037/55229370-1461-4ff6-827d-386789a994c9

sample data: segments.pcd.zip

For a workaround, I may 1) segmentize pointcloud (colored by segment); 2) call CDT (ignoring z); 3) merge each segment's CDT into one.

It'll be great if CDT supports surface pointcloud.


Maybe just modify spatial query, filter out points on other levels (z value) will solve it. I'll give it a try.


https://jeremybyu.github.io/polylidar/introduction.html sounds promising also.

artem-ogre commented 11 months ago

Hi, @district10 If I understood you correctly the question is how to reconstruct the surface in the areas where roads overlap at different height levels. Is this right?

district10 commented 11 months ago

@artem-ogre Yes. It's like building a CDT along the way, without botherings of overpass/underpass.

artem-ogre commented 11 months ago

One may either use another algorithm for surface reconstruction or do some hacks. Maybe constrained DT is not a good tool for the job in your case.