xxxxxxxxxx
40
// ICM WEEK1_Reproduce this image _YICHUN LAN
let img;
// load img for check, comment line_38 to turn off
function preload() {
img = loadImage('goal.png');
}
let x= 625;
let y= 465;
function setup() {
createCanvas(x,y);
}
function draw() {
background(0,255,255);
noStroke();
// totate the red rect
push();
fill(255,0,0);
angleMode(DEGREES);
rotate(-323.2)
translate(0,-20);
rect(0,0,1200,40);
// 1200 only because it's a number longer than the canvas diagonal
pop();
fill(0,200,0);
ellipse(x/2,y/2,310,230);
fill(0,0,125);
rect((x-310)/2+310-40,y/2-40,40,40);
// change next line to comment to hide
// image(img,0,0,x,y,)
}