First page Back Continue Last page Graphics
Shapes Using Vertices, contd.
beginShape(MODE) : MODE tells the computer how to connect vertices
- empty : default, draws closed polygon
- POINTS : draws only points at each vertex
- LINES : draws only lines, in sets of 2 vertices each
- TRIANGLES : draws triangles, in sets of 3 vertices each
- TRIANGLE_STRIP : draws triangles, in back to back sets of 2
- TRIANGLE FAN : back to back triangles, first vertex as initial pt
- QUADS : draws quads, in sets of 4 vertices
- QUADSTRIP : draws quads in sets of 4, in back to back sets of 2