Reference+
Name
triangle()
Description
A triangle is a plane created by connecting three points. The first two arguments specify the first point, the middle two arguments specify the second point, and the last two arguments specify the third point.
Examples
size(400, 400); triangle(120, 300, 232, 80, 344, 300);
Syntax
triangle(x1, y1, x2, y2, x3, y3)
Parameters
x1
(float)
x-coordinate of the first pointy1
(float)
y-coordinate of the first pointx2
(float)
x-coordinate of the second pointy2
(float)
y-coordinate of the second pointx3
(float)
x-coordinate of the third pointy3
(float)
y-coordinate of the third point
Return
void
Related
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.