ToSemIdeia

Untitled

Feb 18th, 2020
476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function setup() {
  2.   createCanvas(1080, 1080);
  3.   noFill();
  4.   angleMode(DEGREES);
  5.   radius = 400;
  6.   n=8
  7.   st = 13
  8.   frameCount = 2500
  9.   c = ['#ff2e63', '#08d9d6', '#eaeaea'];
  10.   frameRate(60);
  11.  
  12. }
  13.  
  14. function draw() {
  15.   background('#252a40');
  16.   translate(width/2, height/2);
  17.   noFill();
  18.   for(i=0; i<5; i++) {
  19.     strokeWeight(2);
  20.     stroke(150, 60);
  21.     polygon(0, 0, radius/pow(2, i), 7-i);
  22.     for(j=0; j<n ; j++) {
  23.       rotate(360/n+frameCount/n);
  24.       push();
  25.       translate(0, radius/pow(2, i));
  26.       rotate(frameCount);
  27.      
  28.       stroke(c[i%3]);
  29.       strokeWeight(1);
  30.       polygon(0, 0, radius/pow(2, i+3), 7-i);
  31.       strokeWeight(st-3*i);
  32.       ellipse(0, 0, radius/pow(2, i+1));
  33.       pop();
  34.     }
  35.   }
Add Comment
Please, Sign In to add comment