Dynamics 101 Jim Van Verth Red Storm Entertainment

Slides:



Advertisements
Similar presentations
Numerical Integration
Advertisements

Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Angstrom Care 培苗社 Quadratic Equation II
AP Physics C Mechanics Review.
1
Numeric Integration Methods Jim Van Verth Red Storm Entertainment
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
INTRODUCTION TO MECHANICS FOR SOLIDS AND STRUCTURES
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Properties of Real Numbers CommutativeAssociativeDistributive Identity + × Inverse + ×
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
Points, Vectors, Lines, Spheres and Matrices
Collision Response Jim Van Verth
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
Solve Multi-step Equations

Break Time Remaining 10:00.
Turing Machines.
PP Test Review Sections 6-1 to 6-6
Bright Futures Guidelines Priorities and Screening Tables
MAT 205 F08 Chapter 12 Complex Numbers.
Bellwork Do the following problem on a ½ sheet of paper and turn in.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Kinetics of Particles So far, we have only studied the kinematics of particle motion, meaning we have studied the relationships between position, velocity,
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Adding Up In Chunks.
PS-5 Test Review. Questions 1 & 2 Distance – 60m/ magnitude only Displacement 10 m east/ magnitude and direction.
MOTION. 01. When an object’s distance from another object is changing, it is in ___.
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
When you see… Find the zeros You think….
Problem #1 E Mathboat.com.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Analyzing Genes and Genomes
Copyright © 2014 John Wiley & Sons, Inc. All rights reserved.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Exponents and Radicals
Clock will move after 1 minute
Copyright © 2014 John Wiley & Sons, Inc. All rights reserved.
PSSA Preparation.
Kinematics of Particles
Essential Cell Biology
Rolling, Torque, and Angular Momentum
Immunobiology: The Immune System in Health & Disease Sixth Edition
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
Copyright © Cengage Learning. All rights reserved.
Rigid Body Dynamics Jim Van Verth
Integration Techniques
Dynamics 101 Jim Van Verth Red Storm Entertainment
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Game Physics – Part IV Moving to 3D
Game Physics – Part I Dan Fleck Coming up: Rigid Body Dynamics.
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
Advanced Computer Graphics Rigid Body Simulation Spring 2002 Professor Brogan.
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Advanced Computer Graphics Rigid Body Simulation
Lecture 16 Newton Mechanics Inertial properties,Generalized Coordinates Ruzena Bajcsy EE
Presentation transcript:

Dynamics 101 Jim Van Verth Red Storm Entertainment

2 Talk Summary Going to talk about: A brief history of motion theory Newtonian motion for linear and rotational dynamics Handling this in the computer

3 Physically Based-Motion Want game objects to move consistent with world Match our real-world experience But this is a game, so… Cant be too expensive (no atomic-level interactions)

4 History I: Aristotle Observed: Push an object, stop, it stops Rock falls faster than feather From this, deduced: Objects want to stop Motion is in a line Motion only occurs with action Heavier object falls faster Note: was not actually beggar for a bottle

5 History I: Aristotle Motion as changing position

6 History I: Aristotle Called kinematics Games: move controller, stop on a dime, move again Not realistic

7 History II: Galileo Observed: Object in motion slows down Cannonballs fall equally Theorized: Slows due to unseen force: friction Object in motion stays in motion Object at rest stays at rest Called inertia Also: force changes velocity, not position Oh, and mass has no effect on velocity

8 History II: Galileo Force as changing velocity Velocity changes position Called dynamics

9 History III: Newton Observed: Planet orbit like continuous falling Theorized: Planet moves via gravity Planets and small objects linked Force related to velocity by mass Calculus helps formulate it all

10 History III: Newton Sum of forces sets acceleration Acceleration changes velocity Velocity changes position g

11 History III: Newton Games: Move controller, add force, then drift

12 History III: Newton As mentioned, devised calculus (concurrent with Leibniz) Differential calculus: rates of change Integral calculus: areas and volumes antiderivatives

13 Differential Calculus Review Have position function x(t) Derivative x'(t) describes how x changes as t changes (also written dx/dt, or ) x'(t) gives tangent vector at time t y(t)y(t) y t x(ti)x(ti) x'(ti)x'(ti)

14 Differential Calculus Review Our function is position: Derivative is velocity: Derivative of velocity is acceleration

15 Newtonian Dynamics Summary All objects affected by forces Gravity Ground (pushing up) Other objects pushing against it Force determines acceleration ( F = ma ) Acceleration changes velocity ( ) Velocity changes position ( )

16 Dynamics on Computer Break into two parts Linear dynamics (position) Rotational dynamics (orientation) Simpler to start with position

17 Linear Dynamics Simulating a single object with: Last frame position x i Last frame velocity v i Mass m Sum of forces F Want to know Current frame position x i+1 Current frame velocity v i+1

18 Linear Dynamics Could use Newtons equations Problem: assumes F constant across frame Not always true: E.g. spring force: F spring = – kx E.g. drag force: F drag = – m v

19 Linear Dynamics Need numeric solution Take stepwise approximation of function

20 Linear Dynamics Basic idea: derivative (velocity) is going in the right direction Step a little way in that direction (scaled by frame time h) Do same with velocity/acceleration Called Eulers method

21 Linear Dynamics Eulers method

22 Linear Dynamics Another way: use linear momentum Then

23 Linear: Final Formulas Using Eulers method with time step h

24 Rotational Dynamics Simulating a single object with: Last frame orientation R i or q i Last frame angular velocity i Inertial tensor I Sum of torques Want to know Current frame orientation R i+1 or q i+1 Current frame ang. velocity i+1

25 Rotational Dynamics Orientation Represented by Rotation matrix R Quaternion q Which depends on your needs Hint: quaternions are cheaper

26 Rotational Dynamics Angular velocity Represents change in rotation How fast object spinning 3-vector Direction is axis of rotation Length is amount of rotation (in radians) Ccw around axis (r.h. rule)

27 Rotational Dynamics Angular velocity Often need to know linear velocity at point Solution: cross product r v

28 Moments of Inertia Inertial tensor I is rotational equivalent of mass 3 x 3 matrix, not single scalar factor (unlike m ) Many factors - rotation depends on shape Describe how object rotates around various axes Not always easy to compute Change as object changes orientation

29 Rotational Dynamics Computing I Can use values for closest box or cylinder Alternatively, can compute based on geometry Assume constant density, constant mass at each vertex Solid integral across shape See Mirtich,Eberly for more details Blow and Melax do it with sums of tetrahedra

30 Rotational Dynamics Torque Force equivalent Apply to offset from center of mass – creates rotation Add up torques just like forces

31 Computing torque Cross product of vector r (from CoM to point where force is applied), and force vector F Applies torque ccw around vector (r.h. rule) Rotational Dynamics r F

32 Rotational Dynamics Center of Mass Point on body where applying a force acts just like single particle Balance point of object Varies with density, shape of object Pull/push anywhere but CoM, get torque Generally falls out of inertial tensor calculation

33 Rotational Dynamics Have matrix R and vector How to compute ? Convert to give change in R Convert to symmetric skew matrix Multiply by orientation matrix Can use Euler's method after that

34 Computing New Orientation If have matrix R, then where

35 Computing New Orientation If have quaternion q, then See Baraff or Eberly for derivation where

36 Computing Angular Velocity Cant easily integrate angular velocity from angular acceleration: Can no longer divide by I and do Euler step

37 Computing Angular Momentum Easier way: use angular momentum Then

38 Remember, I computed in local space, must transform to world space If using rotation matrix R, use formula If using quaternion, convert to matrix Using I in World Space

39 Rotational Formulas

40 Impulses Normally force acts over period of time E.g., pushing a chair F t

41 Impulses Even if constant over frame sim assumes application over entire time F t

42 Impulses But if instantaneous change in velocity? Discontinuity! Still force, just instantaneous Called impulse - good for collisions/constraints F t

43 Summary Basic Newtonian dynamics Position, velocity, force, momentum Linear simulation Force -> acceleration -> velocity -> position Rotational simulation Torque -> ang. mom. -> ang. vel. -> orientation

44 Questions?

45 References Burden, Richard L. and J. Douglas Faires, Numerical Analysis, PWS Publishing Company, Boston, MA, Hecker, Chris, Behind the Screen, Game Developer, Miller Freeman, San Francisco, Dec Jun Witken, Andrew, David Baraff, Michael Kass, SIGGRAPH Course Notes, Physically Based Modelling, SIGGRAPH Eberly, David, Game Physics, Morgan Kaufmann, 2003.