← Back to Projects

3D Cloth Simulation

A C++ and OpenGL project that randomly generates cloth-like geometry via iterative midpoint displacement.

A 3D application developed for a Computer Graphics course, exploring iterative midpoint displacement in three dimensions.

Animated cloth-like geometry

The algorithm uses simple iterative midpoint displacement. When implemented in 2D, the resulting geometry resembles a fractal landscape. Below is a 2D implementation:

2D landscape implementation

Extending this to 3D yielded results more reminiscent of crumpled cloth than terrain. By tuning parameters, some interesting effects emerge:

Uniform parameters produce smooth surfaces Aggressive parameters create crumpled cloth appearance
C++ OpenGL GLEW GLFW GLM Physics Sim