Sketch 2015-05-08
void ofApp::updateAnim(){
max = ofMap(sin(ofGetFrameNum() * 0.04), -1, 1, 16, 50);
num = ofMap(cos(ofGetFrameNum() * 0.04), -1, 1, 3000, 40);
}
void ofApp::drawAnim() {
ofBackground(0, 0, 0);
for(int i = 0; i < num; i++) {
ofSetColor(255, 255, 255, 100);
if(i % 2 == 0) ofSetColor(255, 0, 0, 100);
ofRect(ofRandom(-max, width),
ofRandom(-max, height),
ofRandom(max),
ofRandom(max));
}
if(ofGetFrameNum() == 150) {
renderGif();
}
}
A false sense of directional movement.