 |
 |
 |
 |
Name |
|
vertex() |
 |
|
|
Examples |
|
 |
beginShape(POINTS);
vertex(30, 20);
vertex(85, 20);
vertex(85, 75);
vertex(30, 75);
endShape();
|
 |
|
Description |
|
All shapes are constructed by connecting a series of vertices. vertex() is used to specify the vertex coordinates for points, lines, triangles, quads, and polygons and is used exclusively within the beginShape() and endShape() function. The vertex() function must be called between beginShape() and endShape(). |
 |
|
|
Syntax |
|
vertex(x, y);
vertex(x, y, z);
|
 |
|
|
Parameters |
|
x |
|
int or float: x-coordinate of the vertex
|
y |
|
int or float: y-coordinate of the vertex
|
z |
|
int or float: z-coordinate of the vertex
|
|
 |
|
|
Returns |
|
None |
 |
|
|
Usage |
|
Application & Web |
 |
|
|
Related |
|
beginShape() endShape() bezierVertex() curveVertex() |
|