
Mini- Autodesk Maya 3D Editor (C++)
* UPenn policy restricts public sharing of source code, so the repository isn’t included here, but the descriptions below outline my implementation and technical decisions.​​​​

Built a 3D mesh editor in C++ with OpenGL and Qt, implementing a half-edge data structure for efficient polygon mesh manipulation.
Features include OBJ file loading, interactive mesh topology editing, face triangulation, and Catmull-Clark subdivision for smooth surface modeling.​​
​
Written in Qt Creator
​
Languages: C++
​
​

Half edge meshes and their implementation (how they're built and traversed):​​
Half Edges are the "inside" edges of a face, which means if two faces share an edge, that edge consists of two Half Edges, each belonging to each of the two faces (these two edges are SYM of each other). Half Edges have a pointer that points to the NEXT Half Edge, so when traversing using NEXT, by the time the NEXT half edge is the one you started with, you have traveled the whole face's border edges. Half Edges also have a pointer that points to the SYM Half Edge, which is the Half Edge that physically shares its same two vertices, just in the opposite direction. For example, edge 1a is from Vertex A to Vertex B, and its SYM edge edge 2 is from Vertex B to Vertex A. Additionally, Half Edges have a pointer to its belongFace (the Face that it belongs to), and a pointer to its betweenVert (the Vertex that the Half Edge is "pointing" to. If the edge is from A -> B, then B is the betweenVert).

Quick rundowns:
​
To build a mesh with Half Edges:
Create Vertices, Faces, and pairs of Half Edges for each mesh edge. Link Half Edges in counter-clockwise loops around Faces using next pointers. Pair symmetric Half Edges traveling opposite directions between the same vertices using a map of vertex pairs (if there is an existing entry with the same pairing as you, then you guys must be each other's SYMs).
​​​​
To split an edge:
Insert a new Vertex at the edge's midpoint. Split both the Half Edge and its symmetric counterpart into two new Half Edges each, updating all next and sym pointers to maintain mesh topology.​
​
To triangulate a face:
Pick one Vertex of the n-gon as a "hub" Vertex. Create diagonal Half Edges from the hub to all non-adjacent Vertices, forming a triangle fan that subdivides the original Face into n-2 triangles without adding new Vertices.
​
To subdivide:​
Generate new Vertices at Face centroids, edge midpoints (smoothed using adjacent face centroids), and smoothed positions for original Vertices. Subdivide each n-sided Face into n quads by connecting each original Vertex to its two adjacent edge midpoints and the Face centroid, creating a denser, smoother mesh.