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

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -