SketchBook

虹(動)

a=0;
b=100;

a1=240;
a2=248;
a3=255;

c1=119;
c2=136;
c3=153;

let angle = 0;

function setup(){
createCanvas(1000,1000);
angleMode(DEGREES);
  rectMode(CENTER);
};

function draw(){
background(0);

//後ろの四角
angle += 1;
noStroke();

push();
translate(100,0);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(300,0);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(500,0);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(700,0);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(900,0);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(0,100);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(100,200);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(200,100);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(300,200);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(400,100);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(500,200);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(600,100);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(700,200);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(800,100);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(900,200);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(1000,100);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(0,300);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(100,400);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(200,300);
rotate(angle);
fill(c1,c2,c3,70);
strokeWeight(2);
rect(a,a,b,b);
pop();

push();
translate(300,400);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(400,300);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(500,400);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(600,300);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(700,400);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(800,300);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(900,400);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(1000,300);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(0,500);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(100,600);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(200,500);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(300,600);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(400,500);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(500,600);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(600,500);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(700,600);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(800,500);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(900,600);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(1000,500);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(0,700);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(100,800);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(200,700);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(300,800);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(400,700);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(500,800);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(600,700);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(700,800);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(800,700);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(900,800);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(1000,700);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(0,900);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(100,1000);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(200,900);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(300,1000);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(400,900);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(500,1000);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(600,900);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(700,1000);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(800,900);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

push();
translate(900,1000);
rotate(angle);
fill(a1,a2,a3,50);
rect(a,a,b,b);
pop();

push();
translate(1000,900);
rotate(angle);
fill(c1,c2,c3,70);
rect(a,a,b,b);
pop();

//周りのやつ
strokeWeight(2);

stroke(205,92,92);
line(0,0,50,1000);
stroke(240,128,128);
line(0,50,100,1000);
stroke(250,128,114);
line(0,100,150,1000);
stroke(233,150,122);
line(0,150,200,1000);
stroke(255,160,122);
line(0,200,250,1000);
stroke(220,20,60);
line(0,250,300,1000);
stroke(255,0,0);
line(0,300,350,1000);
stroke(178,34,34);
line(0,350,400,1000);
stroke(139,0,0);
line(0,400,450,1000);
stroke(110,0,0);
line(0,450,500,1000);

stroke(135,206,250);
line(1000,0,950,1000);
stroke(0,191,255);
line(1000,50,900,1000);
stroke(30,144,255);
line(1000,100,850,1000);
stroke(100,149,237);
line(1000,150,800,1000);
stroke(123,104,238);
line(1000,200,750,1000);
stroke(65,105,225);
line(1000,250,700,1000);
stroke(0,0,255);
line(1000,300,650,1000);
stroke(0,0,205);
line(1000,350,600,1000);
stroke(0,0,139);
line(1000,400,550,1000);
stroke(0,0,128);
line(1000,450,500,1000);

stroke(255,0,0);
line(0,450,50,0);
stroke(255,127,80);
line(0,400,100,0);
stroke(255,99,71);
line(0,350,150,0);
stroke(255,69,0);
line(0,300,200,0);
stroke(255,140,0);
line(0,250,250,0);
stroke(255,165,0);
line(0,200,300,0);
stroke(255,215,0);
line(0,150,350,0);
stroke(255,255,0);
line(0,100,400,0);
stroke(225,225,1);
line(0,50,450,0);

stroke(22,94,131);
line(1000,450,950,0);
stroke(70,130,180);
line(1000,400,900,0);
stroke(30,144,255);
line(1000,350,850,0);
stroke(0,191,255);
line(1000,300,800,0);
stroke(0,206,209);
line(1000,250,750,0);
stroke(64,224,208);
line(1000,200,700,0);
stroke(0,255,190);
line(1000,150,650,0);
stroke(0,250,154);
line(1000,100,600,0);
stroke(127,255,212);
line(1000,50,550,0);

stroke(50,205,50);
line(200,0,500,50);
stroke(107,142,35);
line(250,0,500,100);
stroke(34,139,34);
line(300,0,500,150);
stroke(0,128,0);
line(350,0,500,200);
stroke(85,107,47);
line(400,0,500,250);
stroke(152,81,75);
line(450,0,500,300);
stroke(177,53,70);
line(500,0,500,350);

stroke(177,53,70);
line(800,0,500,50);
stroke(152,81,75);
line(750,0,500,100);
stroke(85,107,47);
line(700,0,500,150);
stroke(0,128,0);
line(650,0,500,200);
stroke(34,139,34);
line(600,0,500,250);
stroke(107,142,35);
line(550,0,500,300);
stroke(50,205,50);
line(500,0,500,350);

stroke(255);
line(0,1000,500,350);
line(0,950,500,400);
line(0,900,500,450);
line(0,850,500,500);
line(0,800,500,550);
line(0,750,500,600);
line(0,700,500,650);
line(0,650,500,700);
line(0,600,500,750);
line(0,550,500,800);
line(0,500,500,850);

line(1000,1000,500,350);
line(1000,950,500,400);
line(1000,900,500,450);
line(1000,850,500,500);
line(1000,800,500,550);
line(1000,750,500,600);
line(1000,700,500,650);
line(1000,650,500,700);
line(1000,600,500,750);
line(1000,550,500,800);
line(1000,500,500,850);

line(500,350,500,850);

stroke(255,0,255);
line(450,1000,500,850);
stroke(186,85,211);
line(400,1000,500,867);
stroke(147,112,219);
line(350,1000,500,884);
stroke(153,102,204);
line(300,1000,500,901);
stroke(138,43,226);
line(250,1000,500,918);
stroke(148,0,211);
line(200,1000,500,935);
stroke(153,50,204);
line(150,1000,500,952);
stroke(139,0,139);
line(100,1000,500,969);
stroke(128,0,128);
line(50,1000,500,986);

stroke(255,0,255);
line(550,1000,500,850);
stroke(186,85,211);
line(600,1000,500,867);
stroke(147,112,219);
line(650,1000,500,884);
stroke(153,102,204);
line(700,1000,500,901);
stroke(138,43,226);
line(750,1000,500,918);
stroke(148,0,211);
line(800,1000,500,935);
stroke(106,90,205);
line(850,1000,500,952);
stroke(75,0,130);
line(900,1000,500,969);
stroke(72,61,139);
line(950,1000,500,986);
}