Skip to content

Instantly share code, notes, and snippets.

@diN0bot
diN0bot / README.md
Last active December 24, 2015 22:59 — forked from mbostock/.block

This is a recreation (for the purpose of tinkering with a simplified version) of Lane Harrison’s Exoplanets interactive, which was inspired by Randall Munroe’s XKCD comic. The data is from the Planetary Habilitability Laboratory.

D3’s pack layout places circles so that they touch by default. The XKCD version however uses padding, which is more aesthetically pleasing. Fortunately, D3 2.10’s pack layout now supports padding. You could achieve a similar result through collision detection, but the pack layout is faster to compute. My implementation uses a quantize scale for color, which is my best guess to what’s used in the original, but I can’t know for sure. I make no

@diN0bot
diN0bot / index.html
Created September 1, 2012 18:13 — forked from syntagmatic/index.html
Wild Spiral
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Archimedean Spiral</title>
<script type="text/javascript" src="http://d3js.org/d3.v2.js"></script>
<style>
body {
font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
margin: 40px;