Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Zalgo2462 authored Nov 29, 2016
1 parent 3ba769a commit f6889cd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,23 @@
C# implementation of Fortune's Algorithm. Includes MonoGame example.
Unlike several implemenations of Fortune's Algorithm, this implementation guarantees O(n ln(n)) performance by way of a specialized Red Black Tree (Credit: Raymond Hill).

# Use
var points = new List\<FortuneSite\> {
new FortuneSite(100, 200),
new FortuneSite(500, 200),
new FortuneSite(300, 300)
}
//FortunesAlgorithm.Run(points, min x, min y, max x, max y)
LinkedList\<VEdge\> = FortunesAlgorithm.Run(points, 0, 0, 800, 800);

//VEdge.Start is a VPoint with location VEdge.Start.X and VEdge.End.Y
//VEdge.End is the ending point for the edge
//FortuneSite.Neighbors contains the site's neighbors in the Delaunay Triangulation


Implementation inspired by:
Ivan Kuckir's project (MIT) @ http://blog.ivank.net/fortunes-algorithm-and-implementation.html
Raymond Hill's project (MIT) @ https://github.com/gorhill/Javascript-Voronoi

Feel free to use the code under MIT license. However, if you find the code useful, feel free to send me a message or make a link back to the repo.

0 comments on commit f6889cd

Please sign in to comment.