← back to portfolio
yanghyunw00.github.io / portfolio.txt / academic / meshes.txt

Procedural Geometric Modeling

Meshes · DigiPen CS250 Computer Graphics
course DigiPen CS250 stack C++ · OpenGL

# Overview


This assignment implements procedural mesh generation in C++ to render multiple 3D shapes using OpenGL. The core mesh building logic was written from scratch in Mesh.cpp, generating vertex and index data for a plane, cube, sphere, torus, cylinder, and cone. Each shape supports three rendering modes: textured, wireframe, and normal visualization, all driven by a shared index buffer pattern.

# Tasks Completed


# Reflection


This assignment taught me how 3D geometry is built procedurally from mathematical patterns. The most challenging part was convert_to_lines_pattern() where understanding how a group of 6 indices maps to 4 edges for wireframe rendering required careful thought. Rather than blindly following the pattern, working through each pointer index manually made the logic click. Seeing the same index buffer reused across the sphere, torus, cylinder, and cone also reinforced how powerful a single well-designed function can be.

# Demo


Live WebAssembly build — interact with it directly in the frame above.

← back to portfolio