Stoeoef / spade

Delaunay Triangulations for the Rust Ecosystem
Apache License 2.0
258 stars 47 forks source link

3D delaunay #81

Open nilgoyette opened 1 year ago

nilgoyette commented 1 year ago

I don't know much about the computer science behind 2D/3D delaunay so this might be a bad question, but I might as well as it anyway!

I've been looking for a Rust 3D delaunay triangulation for some years now. Nobody's doing it! There's no crate for it. I'm currently preparing txt files by calling qhull before calling my rust binary, like so

qdelaunay Qz i < sphere_vertices.txt > faces_dti.txt

I wonder, is 3D delaunay super hard to do? Is it totally different from 2D? Also, do you have plan to add it in spade in the future?

glennDittmann commented 2 months ago

Hi, I am currently doing it for my thesis in computer graphics. Would be happy to open source my code after submitting / have it be integrated with spade / spade3.

Stoeoef commented 2 months ago

Thank you! I'm happy to help with the integration. Good luck with the thesis!

glennDittmann commented 1 month ago

@Stoeoef does the dcel work for 3d data, i.e. tetrahedral meshes, out of the box?

Stoeoef commented 1 month ago

Unfortunately not - the dcel only works with 2d things. I think writing a new DCEL (or similar) structure for 3d will be required.

glennDittmann commented 1 month ago

Okay, that is a bit more effort. I'll let you know, maybe my version is comparable enough to spades 2D dcel..

Stoeoef commented 1 month ago

I'm not entirely sure how much conceptual overlap there actually is between 2d and 3d triangulations - it's probably sensible to have dedicated and different APIs for both of them. Maybe the handle-code (e.g., VertexHandle and similar) could (partially) unified - but that's not much of a saving, at least in terms of LOC. I would still count it as a win if we have any 3d-Delaunay implementation in rust available. Please don't feel obliged to do any crazy focus on the integration into Spade (unless it's simpler!).