Sunday, February 26, 2017

Simulation!

I'm so excited that our course has finally moved on to simulations! We used a 1-hour-20-minute class to cover most of the basics of simulation, from the fundamental Euler method for particle simulation to dealing with rigid body and resolving conflicts. For the series of Euler methods, the basic steps are easy to understand: First we know particle's current position x and time step t. Next we take the derivative of x and t to get the velocity. Then we get the force adjusted from environment change to get the acceleration a from the formula f = ma. After that, we can have the changed velocity and then calculate the position at next time step t+1.  The recommended RK4 method (the Runge Kutta Method) is like the advanced version of Euler's Midpoint Method. The difference is that RK4 takes more calculation points and is a forth-order method, so it is more accurate due to less truncation.

For dealing with rigid body, the rotation and angular velocity are added to the matrix. It surprised me again that quaternion can always solve the rotation matrix problem.

Another recommended method is Implicit Euler Method. I didn't quite understand it during the class, but I later understood that it evaluates the velocity function at the end of the time step, so assume the particle as reached the position after the time step, evaluate the function so that the particle can trace back to the original position. This is used to avoid stiff situation, where large k is present, so small h is desired, which might result in unstable solution if we use explicit Euler Method. This was explained clearly in David Baraff's course notes.

I appreciate the pertinent course materials, and I look forward to knowing more details of simulation technology!

No comments:

Post a Comment