Hi everyone,
I am having trouble setting Y coordinates dynamically. For example below I am trying to set posY in draw() if posX is above 600. In essence all I am trying to do is make a new row of circles. Am I setting posY in the wrong place?
Thank you!
int posX;
int posY;
int thesize;
int noofcircles;
//--------------------------------------------------------------
void ofApp::setup(){
ofBackground(ofColor:: gray);
posX = 30;
posY = 30;
thesize = 10;
noofcircles = 256;
}
//--------------------------------------------------------------
void ofApp::update(){
}
//--------------------------------------------------------------
void ofApp::draw(){
for (int i=0; i < noofcircles; i++){
posX = (i * (thesize * 2));
if(posX > 600){
posX = 30;
//posY = 90;
}
ofSetColor(255, 0, 255);
ofCircle(posX, posY, 0, thesize);
}
}