xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight);
background(200);
}
function draw() {
// draw an arc
strokeWeight(0);
fill(255,204,204);
arc(100, 350, 200, 200, 0, QUARTER_PI);
// draw a circle
fill(255,204,153);
circle(300, 400, 100);
// draw a line
strokeWeight(5);
stroke(255,255,102);
line(400, 300, 500, 500);
// draw a rectangle
strokeWeight(0);
fill(153,255,51);
rect(500,350,100);
// draw a triangle
strokeWeight(1);
stroke(0,102,102);
fill(0,153,153);
triangle(700,500,800,350,900,500);
// draw a bezier curve
noFill();
stroke(0, 0, 0);
bezier(1000, 200, 1080, 800, 1150, 300, 1300, 700);
// draw a "Z"
strokeWeight(5);
stroke('red');
beginShape();
vertex(1400, 350);
vertex(1500, 350);
vertex(1400, 450);
vertex(1500, 450);
endShape();
// draw a hexagon
fill('rgb(66,163,207)');
noStroke();
beginShape();
vertex(1600, 350);
vertex(1600, 450);
vertex(1700, 520);
vertex(1800, 450);
vertex(1800, 350);
vertex(1700, 280);
endShape(CLOSE);
}