Skip to content

Instantly share code, notes, and snippets.

View vug's full-sized avatar

Uğur Güney vug

View GitHub Profile
@vug
vug / gist:8995314
Created February 14, 2014 03:31 — forked from anonymous/gist:7186832
void setup() {
size(500, 500);
noFill();
strokeWeight(3);
strokeJoin(BEVEL);
}
float th1, th2, r, x, y, t;
int N = 16;
@vug
vug / gist:8995262
Created February 14, 2014 03:23 — forked from anonymous/gist:8031373
// motion blur hack starts here
int samplesPerFrame = 32;
int numFrames = 48;
float shutterAngle = 1.0;
int[][] result;
float time;
void setup() {
size(500, 500);
@vug
vug / gist:8995227
Created February 14, 2014 03:20 — forked from anonymous/gist:8327328
int samplesPerFrame = 32;
int numFrames = 42;
float shutterAngle = .8;
int[][] result;
float time;
float d1, d2, th, pp = .7, t, tt;
int N = 10, M = 9;
@vug
vug / gist:8995225
Created February 14, 2014 03:19 — forked from anonymous/gist:8674048
int[][] result;
float time;
void draw() {
for (int i=0; i<width*height; i++)
for (int a=0; a<3; a++)
result[i][a] = 0;
for (int sa=0; sa<samplesPerFrame; sa++) {
time = map(frameCount-1 + sa*shutterAngle/samplesPerFrame, 0, numFrames, 0, 1);
@vug
vug / gist:8995222
Created February 14, 2014 03:19 — forked from anonymous/gist:8656012
int[][] result;
float time;
void draw() {
for (int i=0; i<width*height; i++)
for (int a=0; a<3; a++)
result[i][a] = 0;
for (int sa=0; sa<samplesPerFrame; sa++) {
time = map(frameCount-1 + sa*shutterAngle/samplesPerFrame, 0, numFrames, 0, 1);
@vug
vug / gist:8995221
Created February 14, 2014 03:19 — forked from anonymous/gist:8656313
int samplesPerFrame = 32;
int numFrames = 48;
float shutterAngle = .8;
int[][] result;
float time;
void draw() {
for (int i=0; i<width*height; i++)
for (int a=0; a<3; a++)
result[i][a] = 0;
@vug
vug / gist:8995213
Created February 14, 2014 03:18 — forked from anonymous/gist:8337883
int samplesPerFrame = 32;
int numFrames = 32;
float shutterAngle = 1.0;
int[][] result;
void setup() {
size(1000,1000,P3D);
smooth(4);
noStroke();
result = new int[width*height][3];