forked from zanarmstrong's block: Exploring Voronoi polygons, Delaunay triangles, and circumcircles
Created
September 8, 2015 08:45
-
-
Save renecnielsen/7d834d5dbc40901ac327 to your computer and use it in GitHub Desktop.
Exploring Voronoi polygons, Delaunay triangles, and circumcircles
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Exploring Voronoi</title> | |
<link href='http://fonts.googleapis.com/css?family=Raleway' rel='stylesheet' type='text/css'> | |
<script type="text/javascript" src="datgui-min.js"></script> | |
<link rel="stylesheet" href="voronoi.css"> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
</head> | |
<body> | |
<p id="instructions">Explore <a href="http://en.wikipedia.org/wiki/Voronoi_diagram">Voronoi diagrams</a> and <a href="http://en.wikipedia.org/wiki/Delaunay_triangulation">Delaunay triangulation</a>. <strong>Click to add dots.</strong> Drag dots to move them.</p> | |
<label id="form" for="show-voronoi" class="form"> | |
<input type="checkbox" id="show-voronoi" checked> | |
Show Voronoi Polygons | |
</label> | |
<label id="form2" for="show-triangles" class="form"> | |
<input type="checkbox" id="show-triangles" checked> | |
Show Delaunay Triangles | |
</label> | |
<label id="form3" for="show-circles" class="form"> | |
<input type="checkbox" id="show-circles" checked> | |
Show Circles | |
</label> | |
<label id="form4" for="show-circleCenters" class="form"> | |
<input type="checkbox" id="show-circleCenters"> | |
Show Circle Centers | |
</label> | |
<section id="box" class="main"> | |
</section> | |
<!-- call JS files --> | |
<script src="voronoi.js"></script> | |
</body> | |
</html> |
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
�PNG | |