CL冬休み課題
var pointXあ;
var pointYあ;
var pointXい;
var pointYい;
var pointXう;
var pointYう;
var pointXえ;
var pointYえ;
var pointXお;
var pointYお;
var pointXか;
var pointYか;
var pointXき;
var pointYき;
var pointXく;
var pointYく;
var pointXけ;
var pointYけ;
var pointXこ;
var pointYこ;
var pointXさ;
var pointYさ;
var pointXし;
var pointYし;
function setup(){
createCanvas(700, 700);
background(224, 255, 255);
pointXあ=5;
pointYあ=5;
pointXい=250;
pointYい=5;
pointXう=250;
pointYう=700;
pointXえ=5;
pointYえ=700;
pointXお=550;
pointYお=5;
pointXか=700;
pointYか=5;
pointXき=700;
pointYき=700;
pointXく=550;
pointYく=700;
pointXけ=300;
pointYけ=5;
pointXこ=500;
pointYこ=5;
pointXさ=500;
pointYさ=700;
pointXし=300;
pointYし=700;
}
function draw(){
pointXあ=pointXあ + 100;
pointYい=pointYい + 100;
pointXう=pointXう - 100;
pointYえ=pointYえ - 100;
pointXお=pointXお + 100;
pointYか=pointYか + 100;
pointXき=pointXき - 100;
pointYく=pointYく - 100;
pointXけ=pointXけ + 100;
pointYこ=pointYこ + 100;
pointXさ=pointXさ - 100;
pointYし=pointYし - 100;
stroke(2,pointXあ,pointXい,50);
noFill();
ellipse(pointXあ,pointYあ,2);
ellipse(pointXい,pointYい,2);
ellipse(pointXう,pointYう,2);
ellipse(pointXえ,pointYえ,2);
stroke(2,pointXお,pointXか,50);
noFill();
ellipse(pointXお,pointYお,2);
ellipse(pointXか,pointYか,2);
ellipse(pointXき,pointYき,2);
ellipse(pointXく,pointYく,2);
stroke(2,pointXけ,pointXこ,50);
noFill();
ellipse(pointXけ,pointYけ,2);
ellipse(pointXこ,pointYこ,2);
ellipse(pointXさ,pointYさ,2);
ellipse(pointXし,pointYし,2);
line(pointXあ,pointYあ,pointXう,pointYう);
line(pointXい,pointYい,pointXえ,pointYえ);
line(pointXお,pointYお,pointXき,pointYき);
line(pointXか,pointYか,pointXく,pointYく);
line(pointXけ,pointYけ,pointXさ,pointYさ);
line(pointXこ,pointYこ,pointXし,pointYし);
stroke(135,206,250,random(1,50));
line(random(0,700),0,random(0,700),700);
line(0,random(0,700),700,random(0,700));
stroke(0,206,209,random(1,50));
line(random(0,700),0,random(0,700),700);
line(0,random(0,700),700,random(0,700));
stroke(250,250,210,random(1,50));
line(random(0,700),0,random(0,700),700);
line(0,random(0,700),700,random(0,700));
stroke(221,160,221,random(1,50));
line(random(0,700),0,random(0,700),700);
line(0,random(0,700),700,random(0,700));
stroke(0,250,154,random(1,50));
line(random(0,700),0,random(0,700),700);
line(0,random(0,700),700,random(0,700));
stroke(0,255,255,random(1,50));
line(random(0,700),0,random(0,700),700);
line(0,random(0,700),700,random(0,700));
stroke(255,192,203,random(1,50));
line(random(0,700),0,random(0,700),700);
line(0,random(0,700),700,random(0,700));
stroke(255,255,255,random(1,50));
line(random(0,700),0,random(0,700),700);
line(0,random(0,700),700,random(0,700));
stroke(70,130,180,random(1,50));
line(random(0,700),0,random(0,700),700);
line(0,random(0,700),700,random(0,700));
}