File Exchange

image thumbnail


version 1.0.4 (5.35 KB) by Rémy Bretin
Constrain the vertices of a Voronoi decomposition inside the input rectangular cuboid domain.


Updated 02 Apr 2020

View Version History

View License

This routine performs a Voronoi decomposition of an input dataset and constrains the vertices to the input bounded rectangular cuboid domain.

I know that this kind of file already exists, but they had some issues and were not usable for me specific needs. This version works for any type of rectangular cuboid. There are no restrictions for the input seeds: they can be placed far or close from the cuboid domain, inside or outside. The only restriction is that the domain must form a rectangular cuboid.

The file can run as a stand-alone but it would be better to install geom3d toolbox and the function
"mergeCoplanarFaces" used to avoid unnecessary vertices.

Cite As

Rémy Bretin (2021). 3D_voronoi_cuboid_bounded (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (4)

frank tom


Very very nice, runs fine in 2020b, thank you.

Rémy Bretin

Hi W. George, what error do you get when running the demo file? What are you calling cb and ca?

W. George

The code doesn't run. cb, ca etc. are supposed to be vectors yet they are scalars.

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: geom3d

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!