Homework for Tsinghua University's Physics-Based Simulation course, Spring 2026.
This repository contains three programming assignments covering numerical integration, rigid-body contact, and fluid-solid interaction.
| Title | Overview | Preview |
|---|---|---|
| A1: Time Integration | Simulates a 1D damped mass-spring oscillator using Forward Euler, midpoint RK2, and RK4. The implementation compares convergence orders and includes adaptive RK2 time stepping based on step doubling. |
assignment_1/ · Handout · Notes ![]() |
| A2: Rigid Bodies with Contact | Simulates a PID-controlled 3D three-finger gripper holding a sphere. It implements semi-implicit rigid-body integration, compliant point constraints, contact Jacobians, Coulomb friction, and a Gauss-Seidel constraint solver. |
assignment_2/ · Handout · Notes ![]() |
| A3: Fluid-Solid Interaction with Deformable Bodies | Simulates an actively deforming fish in a 2D fluid. The pipeline combines linear blend skinning, SVD-based pose extraction, a GPU-accelerated moment-encoded D2Q9 HOME-LBM solver, moving-boundary momentum exchange, and rigid-body integration. |
assignment_3/ · Handout · Notes ![]() |
The final course project is maintained in a separate repository: GalateaSim.
It is a real-time volumetric soft-tissue simulator for a human leg, using a heterogeneous tetrahedral XPBD model with Stable Neo-Hookean constraints and a Warp/CUDA backend to produce physically based deformation during knee flexion.


