hi , I got this sketch, it draws ellipses, these ellipses create "lines of ellipses"
Can you explain me in normal english how does the if conditional behaves ?
I also dont understand what the rwHop do, and how it is related to Height_of_peaks
I am a newbie, please explain me in a way i can understand. thanks !!!
Here's the code
Code:void setup(){
size (300,300);
smooth();
background (#FF034F);
frameRate(1);
}
void draw(){
fill(#FF034F,90);
noStroke();
rect(0,0,width,height);
// Declare Variables
int totalpoints =100 ;
float steps = totalpoints + 1;
int totalrows =3;
int space_between_row = height/totalrows;
float height_of_peaks = 1;
float rowhop =0 ;
int randnudge = 8;
int E=8;
noFill();
stroke ( 255);
strokeWeight(2);
// Algorithm
for (int i =space_between_row ; i<height ; i+=space_between_row) {
for ( int j = 1 ; j < steps ; j++){
rowhop-= height_of_peaks;
if (j% ( 1+(int)(random(randnudge))) == 0 ){
height_of_peaks*=-1;
// extra conditionalls
if (mouseX>width/2){
E=+50 ;
}
}
ellipse((width/steps)*j+random(-30,30), i+rowhop,E,E);
}
}
}