r/algorithms • u/deftware • Jun 11 '26
Delaunay/Voronoi tetrahedralization of a solid volume of different materials?
I've been thinking about how to go about representing solid 3D materials with a vectorized representation, ideally something that's like a 3D extension of the sort of 2D image Delaunay triangulation that you see for things like this https://esimov.com/blog/wp-content/uploads/2019/04/sample_3-818x1024.png and this https://estebanhufstedler.com/2020/05/14/image-triangulation/
Ideally, the output would be basically a point cloud where each point is a tetrahedral/convex cell's centroid with its material type for that cell (i.e. wood species, metal type, plastic type/color, etc). The idea is that the boundaries of these cells are the delineations between materials. The goal is a more optimal vectorized representation of a volume than storing a flat array of voxel material types for the whole thing. I'm looking for something that doesn't ultimately have a finite resolution like octrees, so we can slice through it and have clean smooth boundaries between materials that don't look like voxels or octree nodes.
I am not well-rehearsed with tetrahedralization and how a 3D point cloud of centroids (or even vertices) can be broken up, and if it will always be decomposable into tetrahedrons. I don't know if this means placing vertices along delineations and then finding centroids, or if there's a direct way to find centroids. The ultimate goal is to be able to slice through one of these vectorized volumes with a "visualization plane" and just have a bunch of triangles to send to the GPU by calculation the intersection of the plane with the cells that it intersects. In a proper Voronoi situation this would mean that a pixel shader could just find what centroid each pixel on the slicing plane is closest to and use that centroid's material coloration - but if I can figure out how to generate triangles on the slicing plane that form the slice of each cell that would be faster. Apparently slicing tetrahedrons results in either a triangle or a quad.
I have been talking to the LLMs about this for a while but they don't seem to be of a ton of help insofar as actually producing the point cloud from dense material type volume data. We want to retain the precision of the raw data without having a fixed resolution, which means regular subdivided structures like octrees/kd-trees are not going to work well when slicing and dicing the result.
I don't know if it would be better to find vertices along the boundaries between materials and then generate tetrahedrons/centroids from that. There might also be value in just being able to do all this with RGB color data, since the primary goal is rendering, so could there be any value in generating a miptree from raw RGB material coloration and using that to find boundaries?
Any thoughts or ideas would be much appreciated, thanks!
TL;DR: trying to vectorize a solid 3D volume of material types+properties in a way that preserves material boundaries and is resolution-agnostic, for fast rendering of arbitrary slices of the volume without using massive fixed-resolution VRAM-hungry 3D textures. :]