Mouseover to repel nodes. Adapted from my talk on force layouts. Compare to the canvas version.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |