Skip to content

Instantly share code, notes, and snippets.

@christophermanning
christophermanning / README.md
Last active December 9, 2015 20:28
Simplex Noise Code 39 Barcode
@christophermanning
christophermanning / README.md
Created December 27, 2012 02:27
Simplex Noise QR code
@christophermanning
christophermanning / README.md
Last active December 10, 2015 07:38
SVG Self Dividing Line
@christophermanning
christophermanning / README.md
Last active December 10, 2015 09:49
2D Random Walk
@christophermanning
christophermanning / README.md
Last active December 10, 2015 10:39
Café wall illusion
@christophermanning
christophermanning / README.md
Last active December 10, 2015 16:18
Octocat Grid

Created by Christopher Manning

Summary

I created this to generate a serialized octocat grid for an upcoming art project. You could use this with any SVG that's only composed of individual path elements.

TODO

  • This renders too slowly for general consumption, so try to fix that.
@christophermanning
christophermanning / README.md
Last active December 14, 2015 03:29 — forked from gtb104/README.markdown
d3.js polybrush.js

Forked from: https://gist.github.com/gtb104/3667340

Here's a d3 plugin that allows you to create a polygon selection. You instantiate it just like d3.svg.brush.

var brush = d3.svg.polybrush();

It has an extra public method that 'brush' does not, and that's 'isWithinExtent(x, y)'. You can use this method to test if a given point falls within the drawn extent.

if (brush.isWithinExtent(x, y)) {
 console.log("I'm inside!");
@christophermanning
christophermanning / README.md
Last active December 22, 2015 04:38
Animated Civis Analytics Logo

Created by Christopher Manning

Summary

I created this to experiment with SVG rotate, chained transitions, and arc generated paths. I picked my company's logo since it has an interesting design and I had an idea of animating it.

My first attempt had me just using the d3.svg.arc() startAngle and endAngle to create the arcs, but that left the arcs with angled edges when they were rotated to line up. Instead, the arcs are full circles and white rectangles rotate around each arc to give the illusion

@christophermanning
christophermanning / README.md
Created January 9, 2013 04:45
Simple Path Editor
@christophermanning
christophermanning / README.md
Created December 4, 2012 20:44
Spherical Force-Directed Layout

Created by Christopher Manning

Summary

Draws a force directed graph using svg:path and geo projections onto a sphere.

TODO