Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Manhattan-style Voronoi diagram for the web!
branch: master
Failed to load latest commit information.
.gitignore added DS_Store to gitignore
README.md Update README.md
Voronoi_diagram.elm added TODO and simplified fitToScreen
Voronoi_set.hs style update

README.md

elm-voronoi --- Check it out!

Pretty Voronoi Manhattan-distance Diagram

Using elm as the display engine. Elm is based on Haskell so it makes sense to test the base layer math in Haskell. Elm is a functional reactive programming language which brings the purity of Haskell to the web.

The Voronoi diagram is defined as: Let X be a space with distance function d. Let K be a set of indices and let (Pk) be a tuple in the space X. The Voronoi region Rk associated with site Pk is the set of all points in X whose distance to Pk is not greater than their distance to the other sites Pj for all j: Rk = {x in X | d(x,Pk) <= d(x,Pj) for all j != k}

See a demo at my personal website

Setup

Follow the guide here to install elm.

Then feed the elm server the .elm file

TODO

  • resize to window
  • fix point globbing
  • react to user
  • Faster algorithm
  • Randomize seed points on each run
Something went wrong with that request. Please try again.