posts tagged 'ActionScript'

political cartography: voting with our pocketbooks

These election maps are kinda late. Here I’m interested in comparing how we, as a country, voted with our ballots versus how we voted with our dollars. Obama received about 70% of the money donated to the major candidates in 2008, but only 53% of the votes, so I expected a bluer map. [...]

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), [...]