A week or so back I wrote about a package I ported/modified to create the Delaunay triangulation in Flash with a few AS3 classes. As I noted there, such a triangulated irregular network (TIN) allows us to interpolate isolines — lines of constant value (aka isarithms, commonly called contours).
So, given a field of points [...]
posts tagged 'code'
isolining package for ActionScript 3
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 [...]
easy shapefile loading in python
My recent work on creating a more flexible circular cartogram algorithm meant that I needed (well, wanted) to load shapefiles into a Python application. After many searches and scouring of message boards, I settled on the OGR/GDAL libraries. And 3 hours later I had it installed on my MacBook…
I’m sure that OGR (vector) [...]