DesignEngrLab / MIConvexHull

A .Net fast convex hull library for 2, 3, and higher dimensions.
http://designengrlab.github.io/MIConvexHull/
MIT License
334 stars 61 forks source link

Voronoi Cell Vertices #27

Open nmacholl opened 5 years ago

nmacholl commented 5 years ago

I'm having a bit of trouble understanding what VoronoiMesh is actually giving me. Example:

List<DefaultVertex> anchors = new List<DefaultVertex>();
anchors.Add(new DefaultVertex() {Position = new double[]{-1, 1}});
anchors.Add(new DefaultVertex() {Position = new double[]{-1, -1}});
anchors.Add(new DefaultVertex() {Position = new double[]{1, -1}});
anchors.Add(new DefaultVertex() {Position = new double[]{1, 1}});
anchors.Add(new DefaultVertex() {Position = new double[]{0, 0}});

var mesh = VoronoiMesh.Create(anchors);

The result of this is a mesh object that contains 4 vertices and 4 edges. From example 5 I am to understand that mesh.Vertices should be the Voronoi cells but they seem to be triangles from the Delauny triangulation and not the Voronoi cells. What am I not understanding here?

ryanadean commented 4 years ago

I noticed this too... any ideas?

Camuvingian commented 1 year ago

Is this fixed?