Skip to content

Instantly share code, notes, and snippets.

@kasperkamperman
kasperkamperman / frameDifferenceMat.pde
Created May 19, 2015 20:35
frameDifference with Mat OpenCV library for Processing
import org.opencv.core.Mat;
import gab.opencv.*;
import processing.video.*;
Capture video;
OpenCV opencv;
Mat cvLastFrameMat;
Mat cvThisFrameMat;
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: ::
:: tumblrgif v3 ::
:: ::
:: converts video files to gif files that meet tumblr's size limit. ::
:: this is a windows batch file. tested on win 10. ::
:: ::
:: depends on: ::
:: ffmpeg ::
:: imagemagick ::
@tsulej
tsulej / harmonograph.pde
Created March 23, 2017 12:42
Harmonograph + noise
// http://generateme.tumblr.com
// Harmonograph with noise
// space - save
// click - change
float time;
float f1,f2,f3,f4;
float p1,p2,p3,p4;
float a1,a2,a3,a4;
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
<!DOCTYPE html>
<html>
<head><title>SOUND</title></head>
<body>
<div>Frequence: <span id="frequency"></span></div>
<script type="text/javascript">
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var oscillatorNode = audioCtx.createOscillator();
var gainNode = audioCtx.createGain();
@beesandbombs
beesandbombs / rgbWaves.pde
Created January 23, 2018 01:47
rgb waves
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
W = 500
H = 585
W1 = W - 1
H1 = H - 1
def setup
@img = load_image '../scratch/girl.png'
@img.filter BLUR, 3
@img.load_pixels
end
@beesandbombs
beesandbombs / swingers.pde
Created February 28, 2018 15:32
swingers
// swingers by dave @beesandbombs
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {