void setup(){
size(400, 400);
frameRate(30);
}
void draw() {
background(220); // Set background color
// Draw shapes
// Line
line(50, 50, 150, 50);
// Rectangle
rect(50, 100, 100, 50);
// Rounded Rectangle
rect(200, 100, 100, 50, 20); // Last parameter sets corner radius
// Ellipse
ellipse(100, 200, 80, 80);
// Circle
ellipse(250, 200, 100, 100);
// Point
point(50, 300);
// Triangle
triangle(150, 275, 200, 350, 250, 275);
// Quadrilateral
quad(300, 250, 350, 300, 300, 350, 250, 300);
}
Comments