A lightweight java library for generating 2D Voronoi diagrams using Fortune's Algorithm
voronoi-java is available in the central maven repository:
<dependency>
<groupId>de.alsclo</groupId>
<artifactId>voronoi-java</artifactId>
<version>1.0</version>
</dependency>
To get the latest version you can just clone the repository and install it into your local maven repository (see Building from Source).
Use a code snippet like this:
Collection<Point> points = ...
Voronoi voronoi = new Voronoi(points);
voronoi.getGraph();
The latest source can be found here on GitHub. To clone the project:
git clone git://github.com/aschlosser/voronoi-java.git
Or download the latest archive.
This project can be built with the latest Java Development Kit and Maven. The command mvn package
will build the project and will put the compiled JAR in target
, and mvn install
will copy it to your local Maven repository.
Your help is welcome! Just open a pull request with your changes.
voronoi-java is licensed under the MIT License. Basically, you can do as you please as long as you include the original copyright notice. Please see the License.md
file for details.
Most of the code is derived from the desciptions included in the book 'Computational Geometry: Algorithms and Applications' by Mark de Berg, Otfried Cheong, Marc van Kreveld and Mark Overmars (ISBN-13: 978-3540779735)