image - Coordinate loop in Processing -
i wanted make image , figured quickest way. idea there rows lines 5 pixels high, , every new row, amount of pixels in between lines 1 pixel more previous row. it's been while since have used java , far came
size(800,800); int z = 2; int w = 5; int max = 800; for(int y = 0;y<max;y++){ for(int x = 0;x<max;x=x+z){ point(x,y); if(y%10 == 0)z++; } }
this code not quite giving me expected, , can't figure out why. appreciated
wow, feel dumb.
size(800,800); int z = 2; int w = 5; int max = 800; for(int y = 0;y<max;y++){ for(int x = 0;x<max;point(x,y)){ x=x+z; } if(y%5 == 0)z++; }
all had move if statement out of second loop.
Comments
Post a Comment