Back to CG425

Assignment 2: Triangle Meshes + Transformations

This assignment reconstructed a 3D terrain mesh from grayscale elevation maps (DEM), then rendered and navigated the mesh in WebGL. I implemented model-view transformations for rotate/zoom/pan, height scaling, projection switching, and wireframe mode.

Implemented Results

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

Output Samples

Input DEM map Terrain rendering result Wireframe terrain view Wireframe terrain closeup

Live Demo

The demo below is fully interactive. Select a dataset from the dropdown (or choose None to reset).

© 2026 Riccardo Bonfanti
Built with Astro