D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
w8r
Full window
Github gist
Largest empty circle
Largest empty circle
<!doctype html> <html> <head> <title>Largest empty circle</title> <script src="https://unpkg.com/d3@4.4.1"></script> <script src="https://unpkg.com/faster-delaunay@1.0.0"></script> <style> html, body { margin: 0; padding: 0; width: 100%; height: 100%; } .control { position: absolute; top: 20px; right: 20px; padding: 10px 20px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 300; font-size: 13px; background: #fff; border-radius: 4px; box-shadow: 0 0 5px rgba(0,0,0,0.5); } .control h4 { font-weight: 300; } .control input[type=number] { width: 50px; } .control div { margin-top: 5px; } </style> </head> <body> <canvas id="canvas"></canvas> <form class="control" id="params"> <div> <label> <input type="number" id="candidates" value="15"> Candidates</label> </div> <div> <label> <input type="number" id="minRadius" value="0"> R<sub>min</sub></label> </div> </form> <script src="index.js"></script> </body> </html>
https://unpkg.com/d3@4.4.1
https://unpkg.com/faster-delaunay@1.0.0