xxxxxxxxxx
size (500, 1000); // Size of Canvas
// Shapes
fill (54, 209, 201); // stuff in blue
line (30, 20, 100, 20); // line (x1, y1, x2, y2); Point A is x1, y1, and point B is x2, y2 Together they form a line from A to B!
triangle(300, 800, 350, 715, 400, 800); // triangle(x1, y1, x2, y2, x3, y3)
// A Quad is a 4 sided shape where the angle is not 90, such as "rect"
quad (30, 700, 100, 720, 220, 790, 50, 850 ); //quad(x1, y1, x2, y2, x3, y3, x4, y4)
ellipse (65, 630, 70, 70); // ellipse (x1, y1, width, height); uses x and y for center
rect (30, 50, 70, 100); // rect (x, y, width, height); x and y are the top left hand corner,
// Note: width is a value, not a location in the cartesian coordinates of the screen
fill (237, 237, 21); // stuff in yellow
// Rect Modes
rectMode (CORNER); // Default Mode
rect (85, 50, 50, 50); // rect (x, y, width, height);
rectMode (CORNERS); // This is *NOT* the default mode, it draws the rectangle after you specify top left and bottom right corners
rect (80, 170, 120, 300); // rect (x1, y1, x4, y4); x4 & y4 are the bottom right hand corner
rectMode (CENTER); // Puts x and y in the center of the shape.
rect (115, 375, 70, 100); // rect (x1, x2, (total)width, (total)height);
rectMode (RADIUS); // Puts x and y in the center of the shape as well.
rect (115, 500, 35, 50); // rect (x1, x2, (half)width, (half)height);