xxxxxxxxxx
25
function setup() {
createCanvas(400, 400);
// Arguments for rect 1
// e.g. rect(topRightX, topRightY, bottomLeftX, bottomLeftY);
define Top left coordinate = X1 , Y1
define Bottom Right coordinate = X2, Y2
rect(x1, y1, X2 - X1 = Width, Y2 - Y1 = Height);
// Arguments for rect 2
center coordinate of rectangle = cx, cy
Width of rectangle = x
Height of rectangle = y
rect(cx - x/2, cy - y/2, x, y)
// Come up with as many as you can think of!
rect();
rect();
rect();
rect();
rect();
rect();
}