Skip to content

Instantly share code, notes, and snippets.

@espinielli
espinielli / README.md
Last active March 28, 2026 15:11 — forked from mbostock/.block
Cahill-Keyes map projection

Cahill-Keyes map projection (I modified Waterman butterfly projection in the geo.polyhedron D3 plugin to have incisions at 17° (Thanks Jason for the great inspiration!).

Gene Keyes's first 5 principles:

  • principal format to an M-shape, joined at south Atlantic
  • principal dividing meridian to 20° W
  • incisions at equator and poles at 17°
  • proportionality of geocells
  • circular parallels for the polar regions
@jinroh
jinroh / README.md
Last active June 6, 2025 17:13
Fourier series visualisation with d3.js.

From Wikipedia:

In mathematics, a Fourier series decomposes periodic functions or periodic signals into the sum of a (possibly infinite) set of simple oscillating functions, namely sines and cosines (or complex exponentials).

Use the bottom right form to change the visualized serie.

@biovisualize
biovisualize / README.md
Last active June 18, 2024 08:32
direct svg to canvas to png conversion

It seems that Chrome finally found a way to let us convert from svg to canvas to png without the tainted canvas security feature/bug.

@nitaku
nitaku / README.md
Last active July 3, 2016 17:04
Fractal treemap of Konanopii (1,724 leaves)

See this gist for the full code.

An example of an unambiguous fractal treemap. See this example discussing the unambiguous representation of unordered trees, and also this other example from which the random tree Konanopii (1,724 leaves) has been taken from.

ipython
run gosper_regions_depth.py
gosperify('konanopii_1724.json','/data/_workspace/hexes.wkt.csv','regions','depth.json')
Ctrl+D
@pykerl
pykerl / README.md
Last active June 7, 2016 15:41
Creating static data visualizations with D3 & Node
@patricksurry
patricksurry / README.md
Last active April 30, 2025 14:40
Imitate hand-drawn (imperfect) circles using cubic Bézier segments

Imitate hand-drawn (imperfect) circles using cubic Bézier segments, based on a Bézier approximation to a perfect circle. TLDR: a good approximation to a quarter circle of unit radius is a cubic Bézier curve with control points P0 = (0,1), P1 = (c,1), P2 = (1,c), P3 = (1,0) where c = 0.551915024494. By varying the points in a sensible way, we can do a good impression of hand-drawn circles.

@mbostock
mbostock / .block
Last active June 1, 2026 10:18
Maze Tree
license: gpl-3.0
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 26, 2026 08:14
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@hugolpz
hugolpz / README.md
Last active August 23, 2017 04:24
Elegant map

D3js try for elegant map out of OSM data.

@phenix-factory
phenix-factory / spip_dev_options.php
Last active January 18, 2016 09:18
Option de développement pour SPIP
<?php
/*********************************/
/*** Options de développement ***/
/*********************************/
// Désactiver le cache de SPIP
// -1: inactif
// 1: actif
define('_NO_CACHE', -1);