Created
December 23, 2013 14:56
-
-
Save taiko19xx/8098436 to your computer and use it in GitHub Desktop.
プロジェクションマッピング勉強会(openFramework)で作ったスクリプトその2
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
// add [ int lineLine ] in testApp.h | |
void testApp::draw(){ | |
srand((unsigned int)time(NULL)); | |
int red = rand() % 124 + 124; | |
int green = rand() % 124 + 124; | |
int blue = rand() % 124 + 124; | |
ofSetLineWidth(10); | |
ofSetColor(red, green, blue, 128); | |
ofLine(0,0,lineLine,0); | |
ofLine(RECT_SIZE,0,RECT_SIZE,lineLine); | |
ofLine(RECT_SIZE,RECT_SIZE,RECT_SIZE-lineLine,RECT_SIZE); | |
ofLine(0,RECT_SIZE,0,RECT_SIZE-lineLine); | |
red = rand() % 124; | |
green = rand() % 124; | |
blue = rand() % 124; | |
ofSetColor(red, green, blue, 128); | |
ofLine(RECT_SIZE,RECT_SIZE,RECT_SIZE+lineLine,RECT_SIZE); | |
ofLine(RECT_SIZE*2,RECT_SIZE,RECT_SIZE*2,RECT_SIZE+lineLine); | |
ofLine(RECT_SIZE*2,RECT_SIZE*2,RECT_SIZE*2-lineLine,RECT_SIZE*2); | |
ofLine(RECT_SIZE,RECT_SIZE*2,RECT_SIZE,RECT_SIZE*2-lineLine); | |
// ofxSyphon | |
m_syphonClient.draw(50, 50); | |
m_mainOutputSyphonServer.publishScreen(); | |
lineLine = lineLine + 5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment