ioros / elm-voronoi

Manhattan-style Voronoi diagram for the web!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Manhattan-style Voronoi diagram for the web!