An interactive C++ and OpenGL playground for implementing fundamental computational geometry and mesh processing algorithms from scratch. The project explores geometry operations commonly encountered in CAD, geometry processing, and computational geometry systems.
- OBJ Loader
- Triangle Mesh Rendering
- Orbit Camera
- Bounding Box Fitting
- Stanford Bunny Rendering
- Face Normal Visualization
- Vertex Normal Visualization
- 2D Polygon Representation
- Polygon Rendering
- Polygon View Fitting
- Polygon Area (Shoelace Formula)
- Polygon Orientation (CW/CCW)
- Point-in-Polygon Test (Ray Casting)
- 2D Cross Product and Orientation Test
- Line Segment Intersection Test
- Line Segment Intersection Point Calculation
- Convex Polygon Clipping (Sutherland-Hodgman)
The Stanford Bunny (Vertices: 35947, Faces: 69451)
| Source Mesh | Geometry Algorithms |
|---|---|
![]() |
![]() |
| Face Normals | Vertex Normals |
|---|---|
![]() |
![]() |
Convex polygon clipping using the Sutherland-Hodgman algorithm.
- Half-plane classification using orientation tests
- Segment-edge intersection calculation
- Iterative clipping against each boundary edge
- CCW clip polygon handling
Blue and magenta: input polygons / White: Clipped Polygon
- Polygon Rendering
- Polygon Area Calculation
- Point In Polygon (PIP)
- Line Segment Intersection
- Line Segment Intersection Point Calculation
- Convex Polygon Clipping (Sutherland-Hodgman)
- Polygon Triangulation
- Polygon Boolean Operations
- Polygon Offset
- SVG Export
- OBJ Loader
- Wireframe Mesh Rendering
- Face Normal Visualization
- Vertex Normal Visualization
- Half-Edge Data Structure
- Laplacian Smoothing
- Mesh Simplification
- Subdivision
- Curvature Visualization
- Geometry Processing Pipeline
- Gaussian Splatting Experiments




