triangle()
Shape / 2D PrimitivesDescription
Draws a triangle to the screen using the coordinates of its three vertices.
Syntax
void triangle(float x1, float y1, float x2, float y2, float x3, float y3)
Parameters
| Name | Type | Description |
|---|---|---|
| x1 | float | x-coordinate of the first vertex |
| y1 | float | y-coordinate of the first vertex |
| x2 | float | x-coordinate of the second vertex |
| y2 | float | y-coordinate of the second vertex |
| x3 | float | x-coordinate of the third vertex |
| y3 | float | y-coordinate of the third vertex |
Returns
voidRelated
Under the Hood
Implementation in Processing.h / Processing.cpp:
Loading...