ArticleslgStudy

mathematics

Triangle strip

Triangle strip is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Triangle strip rather than just read about it. In short: In computer graphics, a triangle strip is a subset of triangles in a triangle mesh with shared vertices, and is a more memory-efficient method of storing information about the mesh. They are more efficient than un-indexed lists of triangles, but usually equally fast or slower than indexed triangle lists.

Triangle strip — main illustration
Triangle strip — illustration

Key takeaways

  • Triangle strip belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Triangle strip to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Triangle strip from memory before moving on to harder problems.

Reference excerpt

In computer graphics, a triangle strip is a subset of triangles in a triangle mesh with shared vertices, and is a more memory-efficient method of storing information about the mesh. They are more efficient than un-indexed lists of triangles, but usually equally fast or slower than indexed triangle lists. The primary reason to use triangle strips is to reduce the amount of data needed to create a series of triangles. The number of vertices stored in memory is reduced from 3N to N + 2, where N is the number of triangles to be drawn. This allows for less use of disk space, as well as making them faster to load into RAM.

For example, the four triangles in the diagram, without using triangle strips, would have to be stored and interpreted as four separate triangles: ABC, CBD, CDE, and EDF. However, using a triangle strip, they can be stored simply as a sequence of vertices ABCDEF. This sequence would be decoded as a set of triangles with vertices at ABC, BCD, CDE and DEF - although the exact order that the vertices are read will not be in left-to-right order as this would result in adjacent triangles facing alternating directions.

OpenGL implementation

OpenGL has built-in support for triangle strips. Fixed function OpenGL (deprecated in OpenGL 3.0) has support for triangle strips using immediate mode and the glBegin(), glVertex*(), and glEnd() functions. Newer versions support triangle strips using glDrawElements and glDrawArrays. To draw a triangle strip using immediate mode OpenGL, glBegin() must be passed the argument GL_TRIANGLE_STRIP, which notifies OpenGL a triangle strip is about to be drawn. The glVertex*() family of functions specify the coordinates for each vertex in the triangle strip. For more information, consult The OpenGL Redbook. To draw the triangle strip in the diagram using immediate mode OpenGL, the code is as follows:

Note that only one additional vertex is needed to draw the second triangle. In OpenGL, the order in which the vertices are specified is important so that surface normals are consistent. Quoting directly from the OpenGL Programming Guide:

GL_TRIANGLE_STRIPDraws a series of triangles (three-sided polygons) using vertices v0, v1, v2, then v2, v1, v3 (note the order), then v2, v3, v4, and so on. The ordering is to ensure that the triangles are all drawn with the same orientation so that the strip can correctly form part of a surface.

It's even clearer within the manual pages:

Draws a connected group of triangles. One triangle is defined for each vertex presented after the first two vertices. For odd n, vertices n, n + 1, and n + 2 define triangle n. For even n, vertices n + 1, n, and n + 2 define triangle n. n – 2 triangles are drawn.

Note that n starts at 1. The above code sample and diagram demonstrate triangles drawn in a clockwise orientation. For those to be considered front-facing, a preceding call to glFrontFace(GL_CW) is necessary, which otherwise has an initial value of GL_CCW (meaning that triangles drawn counter-clockwise are front-facing by default). This is significant if glEnable(GL_CULL_FACE) and glCullFace(GL_BACK) are already active (GL_BACK by default), because back-facing triangles will be culled, so will not be drawn and will not appear on-screen at all.

Properties and construction It follows from definition that a subsequence of vertices of a triangle strip also represents a triangle strip. However, if this substrip starts at an even (with 1-based counting) vertex, then the resulting triangles will change their orientation. For example a substrip BCDEF would represent triangles: BCD,CED,DEF. Similarly, reversal of strips’ vertices will result in the same set of triangles if the strip has an even number of vertices. (e.g. strip FEDCBA will represent the same triangles FED,ECD,DCB,CAB as the original strip). However, if a strip has an odd number of vertices then the reversed strip will represent triangles with opposite orientation. For example, reversal of a strip ABCDE will result in strip EDCBA which represents triangles EDC, DBC, CBA). Converting a general polygon mesh to a single long strip was until recently generally not possible. Usually the triangle strips are analogous to a set of edge loops, and poles on the model are represented by triangle fans. Tools such as Stripe or FTSG represent the model as several strips. Optimally grouping a set of triangles into sequential strips has been proven NP-complete. Alternatively, a complete object can be described as a degenerate strip, which contains zero-area triangles that the processing software or hardware will discard. The degenerate triangles effectively introduce discontinuities or "jumps" to the strip. For example, the mesh in the diagram could also be represented as ABCDDFFEDC, which would be interpreted as triangles ABC CBD CDD DDF DFF FFE FED DEC (degenerate triangles marked with italics). Notice how this strip first builds two triangles from the left, then restarts and builds the remaining two from the right. While discontinuities in triangle strips can always be implemented by resending vertices, APIs sometimes explicitly support this feature. IRIS GL supported Swaps (flipping two subsequent vertices in a strip), a feature relied on by early algorithms such as the SGI algorithm. Recently OpenGL/DirectX can render multiple triangle strips without degenerated triangles using Primitive Restart feature.

References

See also Triangle Triangle fan Computer graphics Graphics cards Optimization (computer science)

Illustrations

Triangle strip: Diagram of four triangles, 1, 2, 3, and 4, with vertices A, B, C, D, E, and F.
Diagram of four triangles, 1, 2, 3, and 4, with vertices A, B, C, D, E, and F.
Triangle strip: Model of two triangles drawn in OpenGL using triangle strips.
Model of two triangles drawn in OpenGL using triangle strips.
Triangle strip illustration
Triangle strip: Curve tracing using triangle strip
Curve tracing using triangle strip

Worked examples

Example 1 — a first encounter with Triangle strip

Start with the simplest possible case. Write down what Triangle strip claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Triangle strip before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Triangle strip ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Triangle strip

In research
Triangle strip appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Triangle strip in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Triangle strip is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer graphics, Triangle geometry, so understanding it makes those chapters shorter.
In everyday life
Look for Triangle strip outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Triangle strip” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Triangle strip in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Triangle strip means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Triangle strip out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Triangle strip in simple terms?

In computer graphics, a triangle strip is a subset of triangles in a triangle mesh with shared vertices, and is a more memory-efficient method of storing information about the mesh. They are more efficient than un-indexed lists of triangles, but usually equally fast or slower than indexed triangle…

Why does Triangle strip matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Triangle strip?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Triangle strip.

Tags

  • Computer graphics
  • Triangle geometry

Keep exploring