How to increment through a nested for loop
in
Programming Questions
•
9 months ago
I'm having trouble figuring out how to change
each element through the for loop.
Here is the code I have so far:
- float inc=1;
- void setup(){
- size(600,600);
- smooth();
- noStroke();
- }
- void draw(){
- background(0);
- fill(100);
- for (int x=20; x<width-20; x+=50){
- for (int y=20; y<height-20; y+=50){
- inc+=.01;
- arc(x,y,30,30,radians(inc),radians(360));
- println(inc);
- }
- }
- }
1