SketchPad

Some web space to sketch, doodle and make notes. Made using these tools. See more of my work here.

Daily Sketches

Sketch 2015-05-23

        void ofApp::setupAnim() {
    ofEnableSmoothing();
    masker.setup(width, height);
    shapeSystem.setup();
    
    shape.setupGradientRing(8, 20, 160);
    shape.setPosition(ofVec3f(halfWidth, halfHeight, 0));
    for(int i = -10000; i < 1000; i+=12) {
        shape.positionZ(i);
        shapes.push_back(shape);
    }
    
    for(int i = 0; i < shapes.size(); i++) {
        shapeSystem.add(shapes.at(i));
    }
    
    img1.loadImage("welcome.png");
    img2.loadImage("unwelcome.png");
    flip = false;
}

void ofApp::updateAnim(){
    for(int i = 0; i < shapes.size(); i++) {
        increment = (i % 2 == 0) ? 4 : -8;
        shapes.at(i).incrementRotateX(increment);
        shapes.at(i).incrementRotateY(increment);
        shapes.at(i).incrementRotateZ(increment / 4);
    }
    
    masker.beginMask();
    ofBackground(ofColor::black);
    shapeSystem.draw();
    if(ofRandom(1) <= 0.1) {
        ofSetColor(ofColor::white, 255);
        ofRect(0, 0, width, height);
        flip = !flip;
    }
    masker.endMask();
    
    masker.beginBackground();
    flip ? img2.draw(0, 0) : img1.draw(0, 0);
    masker.endBackground();
    
    masker.beginForeground();
    flip ? img1.draw(0, 0) : img2.draw(0, 0);
    masker.endForeground();
}

void ofApp::drawAnim() {
    masker.draw();
    if(ofGetFrameNum() == 90) renderGif();
}
    

Sterility and warmth on the last day in Miami

Daily sketch