Reference+
Name
quad()
Description
A quad is a quadrilateral, a four sided polygon. It is similar to a rectangle, but the angles between its edges are not constrained to ninety degrees. The first pair of parameters (x1,y1) sets the first vertex and the subsequent pairs should proceed clockwise or counter-clockwise around the defined shape.
Examples
size(400, 400); quad(152, 124, 344, 80, 276, 252, 120, 304);
Syntax
quad(x1, y1, x2, y2, x3, y3, x4, y4)
Parameters
x1
(float)
x-coordinate of the first cornery1
(float)
y-coordinate of the first cornerx2
(float)
x-coordinate of the second cornery2
(float)
y-coordinate of the second cornerx3
(float)
x-coordinate of the third cornery3
(float)
y-coordinate of the third cornerx4
(float)
x-coordinate of the fourth cornery4
(float)
y-coordinate of the fourth corner
Return
void
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.