/ClothSimJS

Primary LanguageJavaScriptMIT LicenseMIT

p5.js Cloth Simulation

This is a cloth simulation project built using p5.js library. The simulation is based on a mass-spring system, where each point in the cloth is represented as a particle with mass, connected to its neighboring particles with springs.

Getting Started

To run the simulation, simply open the index.html file in your browser. You can also modify the simulation parameters in the index.js and cloth.js file to customize the behavior of the cloth.

Simulation Parameters

The following parameters can be modified in the index.js file:

  • w and h: width and height of canvas.
  • yCount and xCount: the number of rows and columns in the cloth grid.

License

This project is licensed under the MIT License - see the LICENSE file for details.