280 likes | 436 Views
Spacetime Constraints. Andrew Witkin Michael Kass Presenter: Fayun Luo. Outline. Introduction and Motivation A Particle Example SQP Method Extension to Complex Models Discussion A Tiny Movie Demo. Early Computer Simulations.
E N D
Spacetime Constraints Andrew WitkinMichael Kass Presenter: Fayun Luo
Outline • Introduction and Motivation • A Particle Example • SQP Method • Extension to Complex Models • Discussion • A Tiny Movie Demo
Early Computer Simulations The first computer generated simulation—Pixar’s Luxo, Jr. 1986 Question: can we generate those motion automatically? Yes, by adding physics in the simulation.
Physically-based Approaches Solving Initial Value Problems V0 x0 x1
Physically-based Approaches Constraints force methods A man executing a kick A man executing a kick The same kick on a frictionless floor
Physically-based Approaches Spacetime Constraints Basic idea is solve for the character’s motion and varying force over the entire time. Newtonian physics Object Function
Roadmap • Introduction and Motivation • A Particle Example • SQP Method • Extension to Complex Models • Discussion • A Tiny Movie Demo
Problem Statement Governing Equation (Motion Equation): Boundary Conditions: f(t) g Object Function (Energy Consumption):
Discretize continuous function Discretize unknown function x(t) and f(t) as: x1, x2, …xi, … xn-1, xn f1, f2, …fi, … fn-1, fn Our goal is to solve these discretized 2n values. Next step is to dicretize our motion equation and object equation. i 1 n
Difference Formula h h xi - 0.5 xi + 0.5 xi - 1 xi xi + 1 Backward Forward Middle Middle
Discretized Function Motion equation: x x4, f4 x3, f3 x2, f2 Boundary Conditions: x1, f1 t Object Function: When does R have minimum value?
Roadmap • Introduction and Motivation • A Particle Example • SQP Method • Extension to Complex Models • Discussion • A Tiny Movie Demo
Generalize Our Notation Unknown vector: S = (S1, S2, …Sn) x x4, f4 Constraint Functions: Ci(S) = 0 x3, f3 x2, f2 x1, f1 Object Function R(S): t S = (x1, x2, x3, x4, f1, f2, f3, f4)
SQP Step One Pick a guess S0, evaluate Most likely Taylor series expansion of function f(x) at point a is: Similarly, we have: = 0 Omit
SQP Step Two Now we got S1’, evaluate our constraints Ci(S1’), if equal to 0, we are done but most likely it will not evaluate to 0 in the first several steps. So, let’s say Ci(S1’) ≠ 0, let’s apply Taylor series expansion on the constraint function Ci(S) at point S1’ : Omit = 0 Then we will continue with step one and step two until we got a solution Sn which minimize our object function and also satisfy our constraints. S0 S1’ S1 S2’ S2 … Sn
Graphical Explanation of SQP C(S) S1 S2’ S2 S S0 S1’
Roadmap • Introduction and Motivation • A Particle Example • SQP Method • Extension to Complex Models • Discussion • A Tiny Movie Demo
Difficulties • Set up the motion equations • Define the objective equation • Evaluate the derivatives • Fit them into our SQP solver
Derive Motion Equation Use Lagrangian Dynamics to derive our motion equations dynamically: T – Kinetic Energy q – Generalized Coordinates Q – Generalized Forces
The Authors’ Automatic System Graphical User Interface T, Q, q J Dynamic System SQP Solver Function Boxes R H
Roadmap • Introduction and Motivation • A Particle Example • SQP Method • Extension to Complex Models • Discussion • A Tiny Movie Demo
Lagrangian Dynamics Define T for complex system is still too much work.
Define Objective Functions • Walking on hot coals • Walking on eggs • Carrying a bowl of hot soup • Pursued by a bear Define appropriate objective functions may be extremely difficult:
The Author’s Automatic System Symbolic Analysis is really complex, especially for complex system. The state of art symbolic analysis tool is Matlab, Maple. The author’s automatic system may work for some relative simple system.
Local Optimization vs Global Optimization R S0 S* S* S
Roadmap • Introduction and Motivation • A Particle Example • SQP Method • Extension to Complex Models • Discussion • A Tiny Movie Demo
References • Pixar, Luxo, Jr. 1986 • Ronen Barzel, et al. Dynamic Constraints. Siggraph 1987 • Paul Issacs and Michael Cohen, Controlling Dynamic Simulation with Kinematic Constraints, Proc. Siggraph 1987 • David C. Brogan, et al. Spacetime Constraints for Biomechanical Movements. Applied Modeling and Simulation, 2002 • Phillip Gill, et al. Practical Optimization, Academic Press, New York, NY, 1981