Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

3.1 Polygon Meshes and Mesh Representations

Lesson 19 of 32 in the free Computer Graphics notes on Siksha Sarovar, written by Rohit Jangra.

What Is a Mesh

A polygon mesh is a finite set of vertices, edges, and faces that approximates the surface of an object. Triangles dominate today because GPUs are optimized for them and any planar polygon can be triangulated. Quad meshes are common in modeling because they subdivide cleanly and represent flow lines naturally.

1. Explicit Representation

Each face stores its vertices' coordinates directly: F1 = ((x1,y1,z1), (x2,y2,z2), (x3,y3,z3))

  • Pro: Trivial to render face by face.
  • Con: Each shared vertex is repeated -> 3x to 6x duplication; updating a vertex requires touching every face that uses it.

2. Pointer to Vertex List (Indexed Mesh)

Two arrays:

  • Vertex array: V[i] = (x_i, y_i, z_i).
  • Face array: F[j] = (i_a, i_b, i_c), indices into V.
  • Pro: No duplication of coordinates; updating a vertex updates everywhere.
  • Con: Edge queries (find faces sharing an edge) are O(F).
  • This is the standard format for OpenGL element arrays, glTF primitives, .obj files.

3. Explicit Edge Representation (Winged-Edge / Half-Edge)

Three arrays: Vertices, Edges, Faces, with cross-pointers.

  • Each edge knows its two end vertices, its left and right faces, and pointers to neighboring edges.
  • Pro: O(1) topology queries (next edge around a face, faces sharing an edge, vertex valence).
  • Con: Larger memory footprint, more complex updates.
  • Used by 3D modeling tools (Blender's BMesh, Maya) and subdivision algorithms.

Comparison Table

ReprMemoryEdge queryUpdate vertexUse
Explicit facesHighSlowMany placesSimple data
Pointer to vertex listLowSlowSingle placeGPU rendering
Explicit edgesHighO(1)Update onceModeling, mesh ops

Mesh Quality Metrics

  • Manifold: every edge belongs to exactly two faces (closed) or one face (boundary).
  • Watertight: no holes; useful for 3D printing and constructive solid geometry.
  • Aspect ratio of triangles: thin slivers cause numerical and shading problems.
  • Vertex normal averaging: per-face normals are flat-shaded; smoothing requires averaging neighboring face normals into per-vertex normals.

Storage Order Matters

Reordering vertices by vertex cache locality (e.g., Forsyth's algorithm) can double GPU throughput because nearby triangles share vertex shader work via the post-transform cache.