Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int w = 80;
- int cols, rows ;
- float angle = 0;
- float r = w/2 - 5;
- float [][] coords;
- void setup() {
- size(800,800);
- background(0);
- cols = width / w;
- rows = height / w;
- colorMode(HSB, 360, 360, 360);
- delay(10000);
- }
- void draw() {
- fill(0);
- stroke(0);
- rect(0,0,width,80);
- rect(0,0,80,width);
- for(int i = 0; i<cols; i++){
- stroke(255);
- float cx = w + i * w + w / 2;
- float cy = w / 2;
- strokeWeight(1);
- ellipse( cx , cy , w -10 , w -10);
- float x = r * cos(angle * (i+1) );
- float y = r * sin(angle * (i+1) );
- strokeWeight(8);
- point(cx + x,cy + y);
- strokeWeight(1);
- stroke(100);
- for(int j = 0; j<rows; j++){
- stroke(255);
- float cy2= w + j * w + w / 2;
- float cx2 = w / 2;
- strokeWeight(1);
- ellipse( cx2 , cy2 , w -10 , w -10);
- float x2 = r * cos(angle * (j+1) );
- float y2 = r * sin(angle * (j+1) );
- strokeWeight(8);
- point(cx2 + x2,cy2 + y2);
- strokeWeight(1);
- stroke(100);
- stroke(i*10+j*10,255,255);
- strokeWeight(1);
- point(cx+x+(i*w), cy2+y2+(j*w));
- point(cx2+x2+(i*w), cy+y+(j*w));
- }
- }
- angle -= 0.01;
- }
Add Comment
Please, Sign In to add comment