Thanks to visit codestin.com
Credit goes to github.com

Skip to content
forked from mdally/Voronoi

C++ implementation of Fortune's Algorithm for computing bounded Voronoi diagrams

License

JonnyPtn/Voronoi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Voronoi

Windows: Build status

Linux: Codeship Status for JonnyPtn/Voronoi

by Mark Dally

https://github.com/mdally/Voronoi

Modified for use with SFML by Jonny Paton

http://www.sfml-dev.org/

================================================

A simple library for computing Voronoi diagrams using Fortune's algorithm and performing Lloyd's relaxation.

Cmake included, lib and example (in examples folder) should support all platforms supported by SFML

###Usage: //compute the diagram for a set of sites and a bounding box

VoronoiDiagramGenerator::compute(std::vector<Point2>& sites, BoundingBox bbox)

//perform Lloyd's relaxation on the diagram last computed

VoronoiDiagramGenerator::relax()

###Notes:

  • It is your responsibility to ensure that there are no duplicate sites or sites that fall outside or on the borders of the bounding box.

  • Performing Lloyd's relaxation returns a new diagram but does not delete the original. You must delete the old one in order to avoid memory leaks.

About

C++ implementation of Fortune's Algorithm for computing bounded Voronoi diagrams

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 79.8%
  • CMake 19.0%
  • C 1.2%