123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- float x1 = 0;
- float y1 = 0;
- float x2 = 500;
- float y2 = 0;
- float x3 = 500;
- float y3 = 500;
- float x4 = 0;
- float y4 = 500;
- float z= 500;
- float hu = random(360);
- float hi = random(25, 75);
- float ha = random(25, 75);
- float d = 5; // déplacement des points du carré
- float s = 0.2;
- void setup() {
- colorMode(HSB, 360, 100, 100);
- size(1665, 1665, P3D);
- fill(0);
- rect(0, 0, width, height);
- smooth();
- noStroke();
- }
- void draw() {
- pushMatrix();
- translate(width/(6*-2), (height/(6*-2)));
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate(width/6, (height/(6*-2)));
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate(width/6, height/6);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate(width/(6*-2), height/6);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate(width/6, (height/6)*2.5);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate(width/6, (height/6)*4);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate(width/6, (height/6)*5.5);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate(width/(6*-2), (height/6)*2.5);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate(width/(6*-2), (height/6)*4);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate(width/(6*-2), (height/6)*5.5);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*2.5, height/6);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*2.5, height/(6*-2));
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*4, height/(6*-2));
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*5.5, height/(6*-2));
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*2.5, (height/6)*2.5);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*2.5, (height/6)*4);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*2.5, (height/6)*5.5);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*4, (height/6));
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*4, (height/6)*2.5);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*4, (height/6)*4);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*4, (height/6)*5.5);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*5.5, (height/6));
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*5.5, (height/6)*2.5);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*5.5, (height/6)*4);
- scale(s);
- module();
- popMatrix();
- pushMatrix();
- translate((width/6)*5.5, (height/6)*5.5);
- scale(s);
- module();
- popMatrix();
- if (keyPressed) {
- if (key == 's')
- saveFrame("imag_####.png");
- }
- }
|