As I continue to translate Amit’s actionscript to javascript, it is becoming increasingly obvious that I’m missing a crucial part of this codebase- the actual voronoi diagram. Since this is a level of math that is beyond my ability, I’m going to cheat and find another implementation. Raymond Hill has a demo and a nice MIT-licensed library¬†that may be exactly what I need.

After I examine the API, perhaps I can figure out how much the map.js will need to change to use that, if they’re even compatible. I also need to figure out which conceptual primitives I will need. In the meantime I’ve gone through most of the map.js and translated the skeleton of it to javascript. It’s not very useful, but it’s something.