This page has been dormant since fall 2009, and is no longer maintained. If you wish to find a fully working Javascript version of Steven J. Fortune's algorithm to compute Voronoi diagrams, see Raymond Hill's Javascript implementation of Steven Fortune's algorithm to compute Voronoi diagrams
TOFIX: The algorithm which I borrowed as a base for this Javascript implementation has a problem with open-ended edges bound to a single vertex: There is no way to tell the direction of the edge. Working on fixing this by getting rid of Forture's balanced binary tree and using a simple ordered list of beach sections (I wanted to do this to simplify the code, but this happens to be the solution for the problem too.
TODO: to support animation of event processing; to let the user input data textually with auto-scaling of values; to terminate properly the graph with a bounding box; to allow dragging existing sites with the mouse, etc. etc.
| canvas size to pixels × pixels (new sites will be regenerated) | ||
| sites randomly, or... | ||
|
|
Sites: The input is scanned for consecutive pairs of values which are interpreted as (x,y) – any non-valid number character is interpreted as a separator. If most sites supplied are located outside the canvas, an automatic mapping algorithm will kick in. Lattices: The input is scanned for consecutive quadruplets of values which are interpreted as (offset x, offset y, delta x, delta y) – any non-valid number character is interpreted as a separator. Example, try: 0,0,60,100,30,50,60,100 |
|
(down arrow works too) |
Number of sites: ? Number of events in the queue: 0 Total number of events processed: 0 Total number of false alarms (non-empty circles): 0 Total number of vertices: 0 Total number of edges: 0 |