Kanishk Sachdev

Software Engineer and Student

Interactive Cloth Grid

A real-time cloth simulation using Three.js with physics-based tearing mechanics. This implements a mass-spring system with Verlet integration.

Technical Implementation:

Physics Engine: Each cloth vertex is a particle with position, previous position, and acceleration. Using Verlet integration for stable cloth dynamics.

Constraint Solving: Spring constraints maintain cloth structure through iterative relaxation (10 iterations per frame) to prevent stretching.

Tearing Mechanism: Springs break when stretched beyond 1.5x their rest length, creating realistic tear patterns.

Interaction: Raycasting from mouse position to cloth particles enables precise cutting. Click and drag to tear the fabric.

Ripping is currently enabled. The top row is pinned to simulate hanging cloth.

Feel free to contact me at kanishksachdev@gmail.com