Computer Graphics Assignments

CS 425 Computer Graphics · Assignment 2

Triangle meshes and transformations

A 3D terrain mesh reconstructed from grayscale elevation maps, rendered and explored in WebGL.

Each pixel of the digital elevation model becomes a vertex. On top of the mesh I implemented the model-view transformations for rotating, zooming and panning, height scaling, switching between projections, and a wireframe mode.

What I implemented

  • DEM-to-mesh conversion with one vertex per pixel and triangle connectivity
  • Perspective and orthographic projections
  • Interactive rotation, zoom and panning
  • Height scaling and a wireframe toggle

Results

Grayscale elevation map of Mount Rainier.
Input: an elevation map of Mount Rainier.
The terrain mesh rendered in WebGL.
The reconstructed terrain.
The terrain rendered as a wireframe.
Wireframe mode.
Close-up of the wireframe terrain showing individual triangles.
Close-up of the triangle connectivity.

Choose a dataset from the dropdown inside the demo, or None to reset.