This example demonstrates how to create a shape by specifying its vertices in TRIANGLE_STRIP mode, using the beginShape(), endShape(), and vertex() functions.
Triangle Strip: Created by Ira Greenberg. Revised by Darren Kessner. From 2024 onwards, edited and maintained by p5.js Contributors and Processing Foundation. Licensed under CC BY-NC-SA 4.0.
You can find the code history of these examples here: pre-2023 example, 2023 revision code. You can suggest improvements by contributing to the current website!
Related Examples

A point on the unit circle, together with the corresponding sine and cosine values on their graphs.
Sine and Cosine
Animate circular, back and forth, and wave motion.

Two eyes on a black background.
Aim
Rotate toward a point.

Rainbow ring made up of triangles whose vertices lie on two concentric circles.
Triangle Strip
Split a ring into triangles.