For my AP Computer Science final project, I created a fabric simulator from scratch in Processing. This idea spawned from my HAPTIX project. I wanted a way to better model the full 3D positioning of a glove with only a few fabric stretching measurements.

I designed the simulator to be able to simulate different stitching patterns. This is so I could use it to simulate any combination of materials for the glove project.

I tested the simulation by using a ball to push the virtual fabric around.

Screenshot 2016-08-07 21.07.28

The fabric was made up of a matrix of “nodes” with connecting stretchy “links.” It also included stiffness links that keep the fabric from bunching up. Essentially, these stiffness links represent the thickness and actual matter of the fabric in the real world. In the next two pictures, the black links are stretch links and the red links are stiffness links. The stiffness links actually span over two nodes in order to prevent the fabric from folding right in half.

Next year, in my Projects in CS class, I hope to use this simulation to create real time accurate hand models for HAPTIX.

Advertisements