4
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
5
<title>Delaunay Triangulation</title>
6
<script type="text/javascript" src="../../d3.v2.js"></script>
7
<style type="text/css">
9
@import url("../../lib/colorbrewer/colorbrewer.css");
19
<script type="text/javascript">
24
var vertices = d3.range(500).map(function(d) {
25
return [Math.random() * w, Math.random() * h];
28
var svg = d3.select("body")
32
.attr("class", "PiYG");
36
.data(d3.geom.delaunay(vertices))
37
.enter().append("path")
38
.attr("class", function(d, i) { return "q" + (i % 9) + "-9"; })
39
.attr("d", function(d) { return "M" + d.join("L") + "Z"; });