[JAVA] Causes of multiple Singular input data errors in Hull Voronoi 3D

About Hull Voronoi 3D

A program that calculates 3D Voronoi diagrams, the original is written in C #. There is also a Processing (Java) version I made. I often get Singular input data error in findInitialPoints of Convex Hull, so I investigated the cause. https://github.com/Scrawk/Hull-Delaunay-Voronoi https://github.com/Nekodigi/Hull-Voronoi-3D

Cause

In the first place, Singular input data error occurs when the input points match. In findInitialPoints, the coordinates of each axis are narrowed down to the points with the minimum and maximum values, but if they also have the minimum and maximum values for multiple axes, the points are rarely insufficient and the same points are selected. There will be a situation where you will be lost.

Solution

If there are few points, Singular input data error is likely to occur, but the processing is lighter, so it is solved by passing all the points to findInitialPoints.

Recommended Posts

Causes of multiple Singular input data errors in Hull Voronoi 3D
Draw SVG path data (d attribute of path element) in Java + Apache Batik