This exercise allows to displace circles in a non-overlapping way. The collision detection introduced in this gist has been used in order to guarantee a certain padding between circles. The slider on the top allows to change the padding distance between circles.
xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v3.min.js"></script>
<link rel="stylesheet" type="text/css" href="index.css">
<title>Collision detection with force layout</title>
</head>
<body>
<script src="index.js"></script>
</body>
</html>
Modified http://d3js.org/d3.v3.min.js to a secure url
https://d3js.org/d3.v3.min.js