Skip to content

Instantly share code, notes, and snippets.

View aubergene's full-sized avatar

Julian Burgess aubergene

View GitHub Profile
@LingDong-
LingDong- / findcontours.js
Last active April 22, 2024 14:53
Finding contours in binary images and approximating polylines. Implements the same algorithms as OpenCV's findContours and approxPolyDP.
/** Finding contours in binary images and approximating polylines.
* Implements the same algorithms as OpenCV's findContours and approxPolyDP.
* <p>
* Made possible with support from The Frank-Ratchye STUDIO For Creative Inquiry
* At Carnegie Mellon University. http://studioforcreativeinquiry.org/
* @author Lingdong Huang
*/
var FindContours = new function(){let that = this;
let N_PIXEL_NEIGHBOR = 8;
@gamesbyangelina
gamesbyangelina / yahoo-answers-mbmbam
Created October 8, 2019 13:31
MBMBAM Yahoo Answers (Ep 1 - 472, filtered)
I went on a first date with this guy; I didn’t know what to say to him?
What is the first song that comes to mind when I say the word “party”?
Can birds get allergies?
Why did my gf who said she loved me cheat on me rite in fornt of me and not care?
How long does it take to get THC out of your system if you only smoke on the weekends?
My girlfriend threw my dog off my balcony when I broke up with her Im not sure what to do?
Can toenails be swallowed?
Is it okay to bring jelly beans on a plane?
is masturbation create problem?
I’m in LOVE with Krista from Fern Gully. Are there any websites devoted to her?
@Rich-Harris
Rich-Harris / README.md
Created December 14, 2017 15:35
svelte-kit-scroller

Am planning to open source this when I get some breathing room, but a gist will do for now.

Usage:

<Scroller top=0.2 bottom=0.8 threshold=0.5 bind:index bind:offset bind:progress parallax>
  <div slot='background'>
    <!-- fixed, or parallaxing (if the parallax option is set) background -->
  </div>
@shancarter
shancarter / README.md
Last active June 7, 2019 11:42
Using d3 to generate SVGs in node.js

In order to generate some svg with d3 in node.js, you need a dom. This is a bare bones example of using jsdom for said dom.

@veltman
veltman / README.md
Last active November 25, 2019 20:16
Smoother polygon transitions

Smooth transitioning US tour in the same vein as this example. Steps:

  1. Compares both shapes and adds evenly-spaced points to whichever polygon has fewer so that both have the same number of points
  2. Picks the winding of the first polygon that minimizes the sum of the squared distances between point pairs

Some possible improvements:

  • Adding additional points to both shapes first such that every segment longer than a certain distance is bisected
  • Tweaking the placement of added points with simulated annealing
  • Using a cost function that factors in self-intersections at the halfway mark in addition to distance traveled
@veltman
veltman / README.md
Last active May 29, 2019 19:54
Duotoning

Using SVG filters to apply a duotone effect.

@mbostock
mbostock / .block
Last active January 16, 2020 09:23
Percentage Change II
license: gpl-3.0
@mbostock
mbostock / .block
Last active September 23, 2016 12:44
Voronoi Topology
license: gpl-3.0
@mbostock
mbostock / .block
Last active March 19, 2024 07:45
Wrapping Long Labels
license: gpl-3.0
@tmcw
tmcw / README.md
Last active November 9, 2021 04:55 — forked from anonymous/README.md
Jenks Natural Breaks with simple-statistics and d3