posts tagged 'code'

delaunay triangulation in ActionScript 3

update: for a cool usage of Delaunay triangulation, see my isolining package for ActionScript 3

The Delaunay triangulation was invented in 1934 by Boris Delaunay. According to Paul Bourke,

The Delaunay triangulation is closely related geometrically to the Direchlet tesselation also known as the Voronoi or Theissen tesselations. These tesselations split the plane into a [...]

hitTestPoint vs. insidePolygon

update: After trying the below method with highly detailed, dynamically stored polygonal data, I now realize that hitTestPoint is MUCH more efficient. Therefore, the below should only be used with very simple (like less than 20 points) polygons. Hopefully it’s still of interest, though!

When creating dynamic Flash dot density maps (see my wiscMapper), [...]

pixelArea

I thought of this about a year ago, while implementing a dot density map in wiscMapper, but never needed to use it until recently. You see, as I noted recently here, to create a dot density map in Flash, it is typical to create random points within the bounding coordinates of the polygonal feature [...]