GDC 2008

I once again participated in a physics tutorial at the GDC with the Essential Math crew.

You can download my slides here.

Just in case you missed it, Crayon Physics Deluxe won the IGF. Congratulations to Petri!

6 Responses to “GDC 2008”

  1. Nico Says:

    Erin, could you either produce a pdf version, or make sure you embed all fonts in the ppt. You’ve used some fonts that I don’t have on my system, making the slides virtually unreadable (esp. the juicy math parts :))

    Thanks!

  2. Erin Catto Says:

    Ah, sorry about that. It should be fixed now.

  3. Per Vognsen Says:

    Erin, I got a chance to watch some of the talks that day, and yours was probably the best. Great job!

    For fun I just went quickly over the slides again, and I remembered something that puzzled me a bit both when I saw you give the presentation and now. Why do you suggest deriving the Jacobian by differentiating with respect to time and then factoring that mess into a product, rather than just computing it via partial derivatives? By the chain rule, you have dC/dx dx/dt = 0 from C(x(t)) = 0, so you can just compute the matrix representation of dC/dx directly by partial differentiation.

  4. Erin Catto Says:

    Per, you have a good point and that is something I glossed over due to time constraints. IMO, there are a couple reasons to not use partial derivatives.

    1. When C depends on rotation, you have to use some tricky math to differentiate quaternions or rotation matrices. When computing the total derivative, we get to use formulas simpler like dp/dt = v + cross(omega, r).

    2. I find that many people have trouble with multi-variable Calculus. So I’m trying to keep things as simple as possible.

  5. Per Vognsen Says:

    Those are good reasons. Though it’s worth pointing out that the differentiation here is an utterly mechanical process if it’s carried out in coordinates, regardless of whether quaternions or matrices are involved or not; cleverness is only called for if you want to stay coordinate-free (e.g. you have a constraint C that depends on v1, omega1, v2, omega2, and you want to express dC/dx in terms of the v’s and omega’s without referring to their individual coordinates). The good thing about the coordinate-free way is that the resulting expression often paints an obvious geometric picture of what’s going on; but it’s nice to have a fully automated approach (it can even be implemented symbolically in your engine using AD techniques) for when you’re dealing with complex constraint manifolds that are hard to visualize because of the dimensionality involved.

  6. Per Vognsen Says:

    By the way, if you want to really get across the essence of the Jacobian approach to constraint enforcement in one slide, you could explain that what it’s really doing (at least in the case of unbounded lambdas, but the general case is similar) is constraining the velocity by projecting it onto the constraint surface’s tangent space. You can take our bead on wire slide and draw a picture of a non-tangential velocity and say something like, “You can see that this velocity points off the wire, so it doesn’t obey the constraint.” Then there’s nothing more natural than fixing it by projecting it parallel onto the wire’s tangent space, which is equivalent to projecting away the part orthogonal to the tangent space. But the normal vector field to C = 0 is just grad(C), so e = grad(C) (grad(C) . v) is the velocity error with respect to the constraint, and therefore v’ = v - e = (I - grad(C) grad(C)^T) v is the fixed-up velocity. Something like that.

Leave a Reply