4.33333

4.3 | 3 ratings Rate this file 39 Downloads (last 30 days) File Size: 3.17 KB File ID: #34428
image thumbnail

VoronoiLimit

by

 

Constrain the vertices of a Voronoi decomposition to the domain of the input data.

| Watch this File

File Information
Description

The routine performs a Voronoi decomposition of an input dataset and constrains the vertices to the domain of the data themselves, such that even unbounded Voronoi cells become useful polygons (See attached figure).

I asked some time ago on the Matlab Central regarding the existence of such a routine but received no answer so this is my attempt to fix it the hard way.

This is my first upload. Feel free to comment.

Acknowledgements

This file inspired Lloyd's Algorithm.

Required Products Mapping Toolbox
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
01 Jul 2014 UIC

Dear Jakob,
There is only a small bug in the code you may resolve that. for some Voronoi cells (specially those near edges) vertices are not correct. Would you mind to check that.

Good luck,

Ashkan,

22 Sep 2013 Jakob Sievers

Hi Michele
That is an interesting case. I am very limited timewise at the moment but when I do return to this function I will definitely take it into consideration. Could be interesting to add options for empty spaces of arbitrary polygon shapes within the bounding box.

06 Sep 2013 Michele

Great function!
I have a question though. Is it possible to add new internal bounds, for example a "hole" inside a square region?
Thanks

02 Jul 2012 maxime

Great function !
I upgraded it for using it with any bounding shape. Just replacing "crs" variable by any polygon.
Works fine !

20 Jun 2012 Stefanos  
11 Mar 2012 Pearl

I 2nd Richard. I'm trying to get extended boundary, but still have no luck. Let me know if you have chance to upgrade the code. However, I don't have the mapping toolbox either :"(

03 Feb 2012 Jakob Sievers

I have indeed considered adding an option to describe extended boundaries yourself. I will see if I get the time to make those changes.
I am not aware of any file-exchange alternatives to what polybool does, so I'm afraid the mapping toolbox remains a requirement.

24 Jan 2012 Richard Garner

Thanks for this, as I have run into the same problem, with a slight variation. I want the Voronoi diagram limited by a larger boundary outside of the original set of vertices from which the Voronoi diagram is calculated. HOWEVER, unfortunatey I cannot use your function because I do not have the mapping toolbox.

Contact us