Skip to content

Instantly share code, notes, and snippets.

View jeremyabel's full-sized avatar

Jeremy Abel jeremyabel

View GitHub Profile
/* passable motion blur effect using frame blending
* basically move your 'draw()' into 'sample()', time runs from 0 to 1
* by dave
* http://beesandbombs.tumblr.com
*/
int samplesPerFrame = 32; // more is better but slower. 32 is enough probably
int numFrames = 48;
float shutterAngle = 2.0; // this should be between 0 and 1 realistically. exaggerated for effect here
int[][] result;
// by dave @ beesandbombs.tumblr.com >:)
void setup() {
setup_();
result = new int[width*height][3];
result_ = new int[width*height][3];
}
int[][] result, result_;
float time;
- Arrowkey nav, jump to next node in direction of arrow
- Enter to select node, then arrows to select port, enter to jump along that port
@jeremyabel
jeremyabel / index.html
Last active August 29, 2015 14:19
HSL interpolation
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.space {
position: absolute;
@jeremyabel
jeremyabel / README.md
Last active August 29, 2015 14:19
HSL interpolation

Test

@jeremyabel
jeremyabel / index.html
Last active August 29, 2015 14:19
HSL Interpolation
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.space {
position: absolute;
@jeremyabel
jeremyabel / index.html
Created April 23, 2015 01:00
HSL Interpolation
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.space {
position: absolute;
@jeremyabel
jeremyabel / index
Created April 23, 2015 01:01
HSL Interpolation
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.space {
position: absolute;
var order, pathPoints, knots; // the regular stuff goes in these
var nSegments = 500;
var segments = [0], p0;
for (var i = 0; i <= nSegments; i++) {
var t = i / nSegments;
var p1 = bSpline(t, order, pathPoints, knots);
if (p0) {
var dx = p0[0] - p1[0];