0%

Position-Based Dynamics

A simple Position-based Dynamics implementation based on glut. My starter project in physical simulations, which is assigned to me as an interview task. No clamping or self-collision is added, so the cloth folds eccentrically and never stops shaking. Other problems include the sphere always dropping to the left, probably because the Gaussian-Sedel iteration always starts from the right side of the cloth mesh, which introduces an unbalanced impact. Only the vertices are tested in the collision detection, and a little lift is added to the sphere to avoid visual artifacts. Visit github for full code.