xxxxxxxxxx
69
function setup() {
createCanvas(600, 400);
}
function draw() {
background(0);
noStroke();
fill(color('#FFF'));
rect(0, 0, width * 0.4, height * 0.5);
fill(color('#0000FF'));
rect(width * 0.4, 0, width * 0.6, height * 0.5);
fill(color('#F00'));
rect(0, height * 0.5, width * 0.6, height * 0.5);
fill(color('#FFF100'));
rect(width * 0.6, height * 0.5, width * 0.4, height * 0.5);
//------------------------//
fill(color('#000'));
rect(width * 0.07, height * 0.15, width * 0.07, height * 0.2);
triangle(width * 0.23, height * 0.15,
width * 0.23, height * 0.35,
width * 0.35, height * 0.35);
//------------------------//
quad(width * 0.45, height * 0.2,
width * 0.49, height * 0.15,
width * 0.59, height * 0.3,
width * 0.55, height * 0.35);
quad(width * 0.55, height * 0.15,
width * 0.59, height * 0.2,
width * 0.49, height * 0.35,
width * 0.45, height * 0.3);
rect(width * 0.67, height * 0.15, width * 0.08, height * 0.2);
rect(width * 0.643, height * 0.19, height * 0.2, width * 0.08);
quad(width * 0.89, height * 0.15,
width * 0.96, height * 0.25,
width * 0.89, height * 0.35,
width * 0.82, height * 0.25);
//------------------------//
square(width * 0.05, height * 0.65, width * 0.125);
circle(width * 0.31, height * 0.75, width * 0.125);
triangle(width * 0.49, height * 0.65,
width * 0.55, height * 0.84,
width * 0.43, height * 0.84);
//------------------------//
quad(width * 0.7, height * 0.65,
width * 0.73, height * 0.65,
width * 0.79, height * 0.84,
width * 0.65, height * 0.84);
quad(width * 0.89, height * 0.65,
width * 0.97, height * 0.65,
width * 0.92, height * 0.84,
width * 0.84, height * 0.84);
}