Closest pair of points problem is a classic problem. A brute-force will takes N*(N-1)(N-2)... comparisons, which yields an exponential complexity. By using a divide and conquer approach, we fall back to a linearithmic complexity.
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js