for loop grid making me go crazy!!!!!!!!!
in
Programming Questions
•
2 years ago
I've been trying to make a grid using the line() as aposed to using rect() which i see mostly:
the thing which is baffling me is why this code doesn't work at all... it just gives a blank screen :
void setup(){
size(400,400);
smooth();
}
void draw(){
for(int i = 4; i > height; i++){
line( i, 0, i, height);
}
}
this obviously only gives the vertical lines... it looks like it should work, i can't figure out why it doesn't. I'm probably missing something obvious but i just can't see it.
if someone can shed some light on this I would appreciate it.
1