Skip to content

Instantly share code, notes, and snippets.

@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 April 24, 2017 17:51
JSTS Polygon Intersection

Created by Christopher Manning

Summary

This is a map of the Chicago Wards that demonstrates how to use the JSTS Topology Suite and D3.js to find and display intersections between polygons.

Wards shaded grey are scanned since their bounding boxes intersect with the search envelope and wards shaded blue intersect with the search

@christophermanning
christophermanning / octocat.svg
Last active April 26, 2024 17:05 — forked from johan/octocat.svg
octocat.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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
Created January 9, 2013 04:45
Simple Path Editor
@christophermanning
christophermanning / README.md
Last active November 3, 2019 04:00
Flow Field
@christophermanning
christophermanning / README.md
Last active March 12, 2020 02:14
Octocat Force Layout
@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 October 27, 2019 20:02
Spherical Random Walk

Created by Christopher Manning

Summary

Draws a random walk onto a sphere using canvas and geo projections.

Controls