Why did this happen? (grid, cumulative rotations)

edited June 2017 in Questions about Code

I was making a simple grid, but I did something wrong, I found the result interesting, so I changed some things and ended up with this,

I wonder if this is a bug, if not why does this happen?

float rate;

void setup(){
   size(screen.width, screen.height, P2D);
}

void draw(){
   background(0);
   translate(width/2, height/2);
   for (int i = 0; i < 270; i += 1) {
     for (int j = 0; j < 270; j += 1) {
       rotate(rate);    
       stroke(255);  
       point(i, j);
     }
   } 
   //rate += 100;   
   //Nice patterns
   rate += 0.001;   
   //Ever increasing spiral
   //rate += 0.0001;  
   //Weird thing
   //rate += 0.0000001;
}

Answers

Sign In or Register to comment.