Skip to content

Instantly share code, notes, and snippets.

Mitchell’s best-candidate algorithm generates a new random sample by creating k candidate samples and picking the best of k. Here the “best” sample is defined as the sample that is farthest away from previous samples. The algorithm approximates Poisson-disc sampling, producing a much more natural appearance (better blue noise spectral characteristics) than uniform random sampling.

See also the white-on-black and Voronoi variations of this example.

@chetan51
chetan51 / README.md
Last active August 29, 2015 14:03 — forked from mbostock/.block
Test
@chetan51
chetan51 / index.html
Created November 19, 2012 06:25 — forked from mbostock/.block
Circles
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
</head>
<body>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.5.0"></script>
<script type="text/javascript">
var w = 960,