Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function setup() {
- createCanvas(1080, 1080);
- noFill();
- angleMode(DEGREES);
- radius = 400;
- n=8
- st = 13
- frameCount = 2500
- c = ['#ff2e63', '#08d9d6', '#eaeaea'];
- frameRate(60);
- }
- function draw() {
- background('#252a40');
- translate(width/2, height/2);
- noFill();
- for(i=0; i<5; i++) {
- strokeWeight(2);
- stroke(150, 60);
- polygon(0, 0, radius/pow(2, i), 7-i);
- for(j=0; j<n ; j++) {
- rotate(360/n+frameCount/n);
- push();
- translate(0, radius/pow(2, i));
- rotate(frameCount);
- stroke(c[i%3]);
- strokeWeight(1);
- polygon(0, 0, radius/pow(2, i+3), 7-i);
- strokeWeight(st-3*i);
- ellipse(0, 0, radius/pow(2, i+1));
- pop();
- }
- }
Add Comment
Please, Sign In to add comment