home/ atoms/ processing-shape-primitives

Processing provides point, line, rect, ellipse, and bezier as core drawing primitives

The primary shape-drawing functions in Processing are: point(x,y) for a single pixel; line(x1,y1,x2,y2) for a straight segment; rect(x,y,w,h) where x,y is the top-left corner; ellipse(x,y,w,h) where x,y is the centre; triangle() and quad() for polygon variants; and bezier() for a Bezier curve defined by four control points. All shapes are affected by the current stroke and fill settings. The rectMode() and ellipseMode() functions change how the x,y parameters are interpreted (e.g., CORNER vs CENTER).

Examples

rect(15, 15, 40, 40); // Large square ellipse(40, 40, 60, 60); // Large circle bezier(85,20, 10,10, 90,90, 15,80);

Assessment

Name the function and its parameter order needed to draw: (a) a rectangle from its top-left corner, (b) a circle by its centre point.

“A point is the simplest visual element and is drawn with the point() function:”
corpus · processing-handbook-no-login-mirror-pdf-reas-and-fry · chunk 13