diff options
| author | Tim Redfern <tim@getdrop.com> | 2022-11-06 01:19:44 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2022-11-06 01:19:44 +0000 |
| commit | af28dee8c32670db6a9eaf19793678a119cf1dd4 (patch) | |
| tree | ae3c723e863aeda9532bedd1bd8e9c31e9b85cd6 /pluginchooser/src/ofApp.cpp | |
| parent | c5dab1b73a4861dd3d557888908eaff16d388442 (diff) | |
| parent | 6d2306c1200db53de92bd5af73b62b5049d02b56 (diff) | |
not quite right
Diffstat (limited to 'pluginchooser/src/ofApp.cpp')
| -rw-r--r-- | pluginchooser/src/ofApp.cpp | 52 |
1 files changed, 43 insertions, 9 deletions
diff --git a/pluginchooser/src/ofApp.cpp b/pluginchooser/src/ofApp.cpp index 4c98ea7..511b7c6 100644 --- a/pluginchooser/src/ofApp.cpp +++ b/pluginchooser/src/ofApp.cpp @@ -13,8 +13,40 @@ void ofApp::setup(){ } +#define STEPS_X 8 +#define STEPS_Y 6 +#define NUM_FRAMES 10 + void ofApp::update(){ plugingui.update(); + + //seed the pipeline of drawing for the chaos algorithm +/* + n-> delete + n-1 -> chaos -> n + n-2 -> chaos -> n-1 + + . . . + + 1 -> chaos -> 2 + new frame -> chaos -> 1 +*/ + + vector<colourPolyline> frame; + for (int i=ofGetWidth()/STEPS_X;i<ofGetWidth();i+=ofGetWidth()/STEPS_X){ + for (int j=ofGetHeight()/STEPS_Y;j<ofGetHeight();j+=ofGetHeight()/STEPS_Y){ + colourPolyline poly; + poly.addVertex(i,j,ofColor(255,255,255)); + poly.addVertex(i+1,j,ofColor(255,255,255)); + frame.push_back(poly); + } + } + + drawing.push_front(frame); + if (drawing.size()>NUM_FRAMES){ + drawing.pop_back(); + } + } void ofApp::draw(){ @@ -27,17 +59,19 @@ void ofApp::draw(){ testsettings.draw(); - //seed the pipeline of drawing for the chaos algorithm -/* - n-> delete - n-1 -> chaos -> n - n-2 -> chaos -> n-1 + glLineWidth(2); - . . . + for (auto i=drawing.begin();i!=drawing.end();i++){ + for (auto j=i->begin();j!=i->end();j++){ + for (int k=0;k<j->size();k++){ + (*j)[k]=plugingui.calc((*j)[k]); + } + j->draw(); + } + } + + ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)+" fps"); - 1 -> chaos -> 2 - new frame -> chaos -> 1 -*/ } void ofApp::exit() { |
