## Recursion --- # A Brief Introduction to Physics-based Computer Animation. --- ## ToC 1. What is Physics-based Computer Animation 2. How to simulate and visualize the world 3. What about your project --- ### What you will learn here - Brief Introduction to CG: (mainly about simulation and geometry) - Geometry: Mesh, Particle - Simulation: Explicit and Semi-Implicit Methods - "Advanced" C/C++ Programming Skills - How to use pointers - Objective Oriented Programming: class, virtual methods. - A scratch on meta-programming(templates) - Usage of developing tools. - `git`, `xmake`, even Visual Studio - ... --- ### What you will NOT learn - Any confusing topic in CG. (e.g. MVP transformations, how to do rendering actually, GPU Programming, ...) - Any advanced topic in C/C++ (e.g. meta-programming, user-maintained pointers, RAII) - Real World Developing --- ### Requirements - Visual Studio 2019~2022. (only for windows) - Clang Compiler is flavoured. - xmake, VulkanSDK installed. Note: vs2010 is not supported, we use C++ Standard 17.
## Introduction --- ### What is Physics-based Computer Animation Simulate a world inside your computer. --- ### How do we represent Geometry Objects in Computer 1. Particle-based 2. Mesh-based --- ### Simulation = PDE $$ \frac{\partial^2 x}{\partial t^2} = \sum_{i} F_i $$ i.e. $$ \frac{d^2x}{dt^2} = \sum_i F_i $$ --- ### Free Fall $$ \sum_i F_i = Gravity $$ --- ### N-Body Simulation $$ F_i = \text{Universal Gravity} $$ --- ### Cloth Simulation $$ F = \sum_{n \in N(i)} F_n $$ --- ### Explicit Time Integration Instead of $\partial t$, or $dt$, use $\delta t << 1$ to integrate all the physical variables over time. Given $x_i$ at time $t_i$, compute $x_{i+1}$ as: $$ x_{i+1} = x_{i} + \frac{dx}{dt} \delta t $$ > Semi-Implicit Scheme. --- ### Your work... 1. N-Body(Provided) 2. Particles with gravity 3. sand-simulation: based on (2), add basic collision detect and handling. (DEM) 4. pick one of the following: 1. (Recommended) mass-spring cloth. 3. SPH Fluid. > About Materials...