Grading results
Skeleton code visualizing all edges (instead of only the surface) is implemented for your convenience. Two versions (Javascript only / Javascript + pyscript) are available.
tetSurfaceTriIds
of bunny model erroneously include surfaces inside the mesh.
Edge connections and tetrahedrons are fine, so it won't affect the simulation. You can use the bunny model we provided without fixing this error. Of course, you can use other mesh (doesn't have to be a bunny!) to your own taste. If you want to create your own tetrahedralized-meshes or other existing meshes, you can refer to this library https://github.com/wildmeshing/fTetWild
In this programing assignment, we will implement soft-body and rigid-body simulation based position-based dynamics (PBD), and its extended version (XPBD), which has been popularly used in many computer graphics applications such as computer games, where it is equipped in many popular graphics libraries such as Unity or Nvidia’s Flex. It has many advantages over traditional force-based approaches such as simplicity in implementation, fast recovery from invalid state. The original papers can be found here and here
The file below is a skeletal code which renders a softbody mesh and changes its all vertex positions upward. If you want to use your own framework, the instruction to run the program should be included when submission.
(05/03) Add edge rendering
PyScript
JavaScript