P5JS – LA3 – 3.2
This lesson was very similair to the last one, but now we used the HSB colormode, I think I prefer this mode, because I think you have to search the colours less online and you can change the brughtness etc easier. This time I did the assignment of colouring a previous creation, this is the result:
function setup() {
createCanvas(400, 400);
background(0);
colorMode(HSB);
//triangle//
strokeWeight(7);
stroke(0, 100, 100);
fill(180, 75, 90);
triangle(20, 20, 90, 160, 160, 20);
//quad//
stroke(90, 100, 100);
fill(270, 80, 60);
quad(220, 20, 380, 20, 320, 160, 280, 160);
//star//
stroke(270, 80, 60);
fill(90, 100, 100);
beginShape();
vertex(90, 240);
vertex(105, 280);
vertex(160, 280);
vertex(115, 310);
vertex(140, 360);
vertex(90, 330);
vertex(50, 360);
vertex(65, 310);
vertex(20, 280);
vertex(75, 280);
endShape(CLOSE);
//arc//
stroke(180, 75, 90);
fill(0, 100, 100);
arc(340, 270, 180, 180, HALF_PI, PI);
}