The Delaunay triangulation, the dual of Voronoi tesselation, creates a planar, triangular mesh for a given set of points. This example updates the Delaunay triangulation in response to mouse interaction! Colors by Cynthia Brewer; algorithm by Steven Fortune; implementation based on work by Nicolas Garcia Belmonte; interaction inspired by Raymond Hill.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<!-- Load the d3 library. --> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'> | |
<style> | |
body { font-family: "Open Sans"; } | |
text.stateID { dominant-baseline: middle; text-anchor: middle; } | |
</style> | |
</head> |