Skip to content

Latest commit

 

History

173 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voronoi 3D

This code allows the construction of bounded 3D Voronoi diagrams inside an arbitrary polytope.

Given a set of seeds, the code first constructs the corresponding Delaunay triangulation using an iterative insertion flipping algorithm. Next, the dual Voronoi diagram is extracted. It is implemented in such a way that the Voronoi diagram is automatically bounded inside a specified polytope.

Example sphere 1 Example sphere 2

Example cube 1 Example cube 2

Complex example

In the following example, we see how the code has been used to generate secondary pulmonary lobules inside a lung geometry.

Example right lung Example left lung

Usage

An example of how to use this is found in example/.

From example/, compile using:

cmake -S . -b build
cmake --build build

Then you may run from example/build/ the .example executable.

The most high-level interface is in voronoi.h. One can pass either an array of seeds or generate them inside of the Bounding Polyhedron using the method of Poisson disc sampling with a user specified sizing function (local minimum distance between points). The output is the corresponding Voronoi diagram structure (vd_3d.h).

References

Source for the Delaunay algorithm: Computing the 3D Voronoi Diagram Robustly: An Easy Explanation. Hugo Ledoux.

About

Construct bounded 3D Voronoi diagrams in C.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages