liveBook · Manning

Mesh

As explained in Digital Twins in Action

A mesh-based 3D model represents complex shapes as networks of points and connecting lines or polygonal elements for efficient rendering.

A mesh represents a 3D surface as connected polygons, typically triangles. It approximates complex shapes while supporting efficient rendering, making it useful for navigating large physical assets in browser-based digital twins. section 7.1 section 2.4.2

A polygon mesh is built from a small set of geometric components:

  • Vertices are points with x, y, and z coordinates; edges connect pairs of vertices. section 7.1
  • Faces are closed sets of edges. Polygonal faces have three or more connected vertices, such as triangles or quadrilaterals. section 7.1
  • Normals are vectors perpendicular to a vertex or face; rendering uses them for lighting. section 7.1

A cube in OBJ

A mesh can be defined in a text editor. The OBJ cube uses eight vertex coordinates, six face normals, and six quadrilateral faces. Each face refers to vertices and a normal using the vertex//normal form. This exposes the file structure used to describe geometry, even though practical workflows often export models from software. section 7.1

Listing 7.1 Definition of a 3D cube in OBJ file format
# Vertices
v -1.0 -1.0  1.0
v  1.0 -1.0  1.0
v  1.0  1.0  1.0
v -1.0  1.0  1.0
v -1.0 -1.0 -1.0
v  1.0 -1.0 -1.0
v  1.0  1.0 -1.0
v -1.0  1.0 -1.0

# Face normals
vn  0.0  0.0  1.0  # Front face normal
vn  1.0  0.0  0.0  # Right face normal
vn  0.0  0.0 -1.0  # Back face normal
vn -1.0  0.0  0.0  # Left face normal
vn  0.0  1.0  0.0  # Top face normal
vn  0.0 -1.0  0.0  # Bottom face normal

# Faces (format: vertex//normal)
f 1//1 2//1 3//1 4//1  # Front face
f 2//2 6//2 7//2 3//2  # Right face
f 6//3 5//3 8//3 7//3  # Back face
f 5//4 1//4 4//4 8//4  # Left face
f 4//5 3//5 7//5 8//5  # Top face
f 5//6 6//6 2//6 1//6  # Bottom face

Inspect the cube’s vertex, normal, and face records together. section 7.1

Mesh density controls a practical tradeoff: more detail improves the approximation but consumes more computing resources. Choose fidelity for the task rather than maximizing it by default. Basic models can be created and updated with relatively modest skills, while producing models for equipment visualization and interactive walkthroughs can require 3D modeling expertise. section 2.4.2 section 2.7 section 7.6

Meshes differ from point clouds, which consist of discrete points, and voxel models, which use volumetric cubes. Building information models can also carry semantic and operational properties; a visualization mesh primarily supplies an intuitive geometric view. section 7.1 section 2.4.2

In simulation, a mesh has a related but distinct role: it divides a domain into computational elements or grid points. Finite element analysis applies physics equations to elements, while computational fluid dynamics solves flow equations over a discretized space. A surface mesh for visualization should not automatically be treated as a simulation-ready mesh. section 9.5 section 9.6

How Digital Twins in Action covers it

How deep it goes
Explains mesh primitives, a hand-written OBJ cube, and fidelity tradeoffs; also distinguishes computational meshes used in simulation.
Examples
Uses a hand-written OBJ cube and a mesh-based model of Melbourne to illustrate geometry and large-scale visualization.
What you can do after
Build a simple mesh from scratch in OBJ and evaluate fidelity against rendering requirements.
How it connects
Connects meshes to digital twins, point clouds, building information modeling, finite element analysis, and computational fluid dynamics.

Also explained in

Compare how 2 books explain mesh →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Digital Twins in Action. The section links point to the parts of the book it draws on.