cloth-physics is a native desktop application for 2D cloth physics simulation implementing Verlet integration. It's written in Gio, a GUI framework for Go.
It has the following characteristics:
Note: In case you want to learn more about the implementation details, here is a detailed article I wrote: https://medium.com/@esimov/2d-cloth-simulation-in-go-using-gio-gui-b3dfe00b7223.
Before running the application check the Gio documentation for the system requirements. Install the required dependencies then type the following commands.
$ git clone https://github.com/esimov/cloth-physics
$ go run ./...
Another way is to build the executable yourself then simply run it.
$ go build ./...
$ cloth-physics
If you don't have Go installed on your machine you can run the prebuild binary files from the project packages page. For convenience if you wish to try the application on a mobile device the .apk
file is also provided in the same packages page.
$ cloth-physics -h
-debug-cpuprofile string
write CPU profile to this file
-debug-frame
debug the Gio frame rates
Copyright © 2023 Endre Simo
This software is distributed under the MIT license. See the LICENSE file for the full license text.