Visual Interactive Simulation, TDBD24, Spring 2006

Similar documents
PSE Game Physics. Session (6) Angular momentum, microcollisions, damping. Oliver Meister, Roland Wittmann

Modeling and Solving Constraints. Erin Catto Blizzard Entertainment

Rigid Body Dynamics and Beyond

Here s a typical flow chart for game physics.

27. Impact Mechanics of Manipulation

Collision Resolution

CS-184: Computer Graphics

Computer Animation. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics. Slides courtesy of Leonard McMillan and Jovan Popovic

Simulation in Computer Graphics Elastic Solids. Matthias Teschner

The... of a particle is defined as its change in position in some time interval.

Game Physics. Game and Media Technology Master Program - Utrecht University. Dr. Nicolas Pronost

2007 Problem Topic Comment 1 Kinematics Position-time equation Kinematics 7 2 Kinematics Velocity-time graph Dynamics 6 3 Kinematics Average velocity

System of objects (particles)

Thursday Simulation & Unity

Physics 2514 Lecture 26

Projects. Assignments. Plan. Motivational Films. Motivational Film 1/6/09. Dynamics II. Forces, Collisions and Impulse

GAME PHYSICS ENGINE DEVELOPMENT

What make cloth hard to simulate?

Lecture Outline Chapter 11. Physics, 4 th Edition James S. Walker. Copyright 2010 Pearson Education, Inc.

WORK PRE-LAB QUESTIONS: 1. List the equation that represents the relationship between work, force, and displacement.

Particle Systems. CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2017

Measurement p. 1 What Is Physics? p. 2 Measuring Things p. 2 The International System of Units p. 2 Changing Units p. 3 Length p. 4 Time p. 5 Mass p.

Physics 8, Fall 2011, equation sheet work in progress

Assignment 4: Rigid Body Dynamics

Course Name: AP Physics. Team Names: Jon Collins. Velocity Acceleration Displacement

Chapter 5 Newton s Laws of Motion. Copyright 2010 Pearson Education, Inc.

Physics C: Mechanics

Mechanics. In the Science Program, Mechanics contributes to the following program goals described in the Exit Profile:

particle p = m v F ext = d P = M d v cm dt

Impulse, Momentum, and Energy

Modeling Friction and Contact in Chrono. Theoretical Background

Momentum and Collisions

Physics Fall Mechanics, Thermodynamics, Waves, Fluids. Lecture 20: Rotational Motion. Slide 20-1

UNIVERSITY OF SASKATCHEWAN Department of Physics and Engineering Physics

IMPACT Today s Objectives: In-Class Activities:

The Pendulum. The purpose of this tab is to predict the motion of various pendulums and compare these predictions with experimental observations.

Kinematics

UNIVERSITY OF SASKATCHEWAN Department of Physics and Engineering Physics

Particle Systems. University of Texas at Austin CS384G - Computer Graphics

Chapter 8- Rotational Motion

A Level Maths Notes: M2 Equations for Projectiles

Handling robot collisions in the state estimator module of the MI20 robotsoccer system

the gamedesigninitiative at cornell university Lecture 18 Box2D Physics

AP Physics 1 Syllabus

Lecture 9 - Rotational Dynamics

PHYS 1114, Lecture 33, April 10 Contents:

A Correction To Brian Mirtich s Thesis: Impulse-based Dynamic Simulation of Rigid Body Systems. Rahil Baber. 15 th February 2011

Physics 8, Fall 2013, equation sheet work in progress

Practice Exam #3 A N B. 1.2 N C N D N E. 0 N

Here are some internet links to instructional and necessary background materials:

Outline. Advances in STAR-CCM+ DEM models for simulating deformation, breakage, and flow of solids

AP PHYSICS 1 BIG IDEAS AND LEARNING OBJECTIVES

EXPERIENCE COLLEGE BEFORE COLLEGE

1 Restatement of the Problem. 2 Terms and Ambiguous Words. 3 Ambiguous Words. 4 Assumptions. # 6654 Page 2 / 19

CEE 271: Applied Mechanics II, Dynamics Lecture 17: Ch.15, Sec.2 4

12. Foundations of Statics Mechanics of Manipulation

Lecture I: Basic Physics

APPLIED MATHEMATICS AM 02

CS 480/680: GAME ENGINE PROGRAMMING

PSE Game Physics. Session (3) Springs, Ropes, Linear Momentum and Rotations. Atanas Atanasov, Philipp Neumann, Martin Schreiber

UNIVERSITY OF SASKATCHEWAN Department of Physics and Engineering Physics

Chapter 8: Momentum, Impulse, & Collisions. Newton s second law in terms of momentum:

Lecture 9 Kinetics of rigid bodies: Impulse and Momentum

Rotation and Translation Challenge Problems Problem 1:

Physics Tutorial 6: Collision Response

Introductory Physics PHYS 120 Challenge Program Course - Southwest Minnesota State University

BRAZOSPORT COLLEGE LAKE JACKSON, TEXAS SYLLABUS PHYS MECHANICS AND HEAT

Energy problems look like this: Momentum conservation problems. Example 8-1. Momentum is a VECTOR Example 8-2

Lecture 18. Newton s Laws

Which iceboat crosses the finish line with more kinetic energy (KE)?

Today s lecture. WEST VIRGINIA UNIVERSITY Physics

AP Physics C: Mechanics Practice (Systems of Particles and Linear Momentum)

KINETIC THEORY OF GASES

Chapter 7- Linear Momentum

PHY131H1S - Class 20. Pre-class reading quiz on Chapter 12

16. Friction Mechanics of Manipulation

GRANULAR DYNAMICS ON ASTEROIDS

AP Physics B Syllabus

8.01x Classical Mechanics, Fall 2016 Massachusetts Institute of Technology. Problem Set 8

Final Exam December 15, 2014

Physics 11 Honours. x-dir px : m1 v1 = (m1 + m2 ) V cos y-dir py : m2 v2 = (m1 + m2 ) V sin A Collision at an Intersection Example 1:

CHAPTER 1: PHYSICAL QUANTITIES AMD MEASUREMENT

Ellipsoid Collision as a Linear Complementarity Problem

Physics 141 Course Information

AP Physics 1. Course Overview

AP Physics C. Momentum. Free Response Problems

COURSE OUTLINE General Physics I

STATICS Chapter 1 Introductory Concepts

Physics of Rotation. Physics 109, Introduction To Physics Fall 2017

Chapter 4: Dynamics. Newton s Laws

PHYSICS. Chapter 11 Lecture FOR SCIENTISTS AND ENGINEERS A STRATEGIC APPROACH 4/E RANDALL D. KNIGHT Pearson Education, Inc.

Gravity Pre-Lab 1. Why do you need an inclined plane to measure the effects due to gravity?

Game Physics. Game and Media Technology Master Program - Utrecht University. Dr. Nicolas Pronost

Broward County Schools AP Physics 1 Review

Physics 1. and graphical representations. Express the motion of an object using narrative, mathematical,

the gamedesigninitiative at cornell university Lecture 17 Physics and Motion

Page 2. Example Example Example Jerk in a String Example Questions B... 39

STATICS & DYNAMICS. Engineering Mechanics. Gary L. Gray. Francesco Costanzo. Michael E. Plesha. University of Wisconsin-Madison

Optimising the Computational Simulation of Mechanical Models: Designing a Real-Time Mass-Aggregate Physics Engine

SPRING 2003 Final Exam, Part A

Transcription:

Visual Interactive Simulation, TDBD24, Spring 2006 Lecture 6 Outline Cross product as matrix multiplication The collision matrix The Newton Coulomb impulse for rigid bodies N C updates of translational and rotational velocities Multiple contact points An iterative solver (for lab 3 4) Next lecture... Intersection of convex polyhedra Separating axis theorem Intersection points for oriented bounding boxes (OBB) Cross product as matrix multiplication The cross product is defined as, a =(a i,a j,a k ), b =(b i,b j,b k ) i j k a b = a i a j a k b i b j b k =(a jb k b j a k,a k b i b k a i,a i b j b i a j ) Assume we could write this as a matrix product instead, a b = a b The special construct, the cross product matrix, a, that allows this is, a = 0 a z a y a z 0 a x a y a x 0 1

The collision matrix The collision matrix is mainly a way to compactify notation. An impulse will change the center of mass velocities as, v A,B = v A,B +/ J/m A,B It will also change the angular velocities, ω A,B = ω A,B +/ I 1 A,B(r A,B x J) The new velocities at the collision points thus are, u A,B = u A,B +/ (J/m A,B + (I 1 A,B(r A,B x J)) x r A,B ) = u A,B +/ (1/m A,B r A,Bx I 1 A,B r A,B x ) J The collision matrix Thus, the change in the relative collision velocity is, u = u u = (u A u B ) (u B u A ) u = (1/m A + 1/m A (r Ax I 1 A r A x + r Bx I 1 B r B x) ) J which can be written as, u = K J where K is called the collision matrix. 2

Newton Coulomb impulses for rigid bodies First we assume sticking, with zero tangential velocity after the impact, that is, u t = 0 u n = e u n Given that u = u u, we can write the impulse as, J = K 1 (u u) We can compute normal and tangential components of J J n = (J n) n J t = J J n The tangential friction is reactive and depends on the normal force. Sticking requires that, J t J n Otherwise we must consider sliding friction. (identical with the max(...) clamping law in previous lectures look it up and compare!). Newton Coulomb impulses for rigid bodies For sliding, we first determine the direction of sliding, u n = (u n) n u t = u u n Now we can compute the sliding unit vector, t = u t / u t Next, we define the sliding impulse to be, J = j n µ j t (i.e. J n = j n) 0 µ 1 is the friction coefficient. 3

Newton Coulomb impulses for rigid bodies Thus, we know an expression for the impulse how this impulse changes the collision velocity how the normal velocity changes due to Newton s impact law Take the dot product of u = u u = K J with the collision normal n, u n = u n + n T K J Use Newton s impact law u n = e u n e u n = u n + n T K J Newton Coulomb impulses for rigid bodies Rearrange and insert the expression for J, (1+e)u n = n T K(jn µ j t) Finally we solve for j, to compute the unknown impulse. (1+e)u n = n T K(n µ t) j j = (1+e)u n / n T K(n µ t) Knowing j, we can compute the impulse, and Thus the new post collision translational and rotational velocities of body A and B, respectively! 4

Review NC Rigid Body Collisions (Broad phase collision detection) Narrow phase collision detection List of intersections Compute collision velocity Check if colliding, resting or separating If colliding, compute the NC impulse Update translational (CoM) and rotational velocity... add external forces, handle contacts, time integrate, render... J 0 impulse Multiple simultaneous contacts/collisions E.g. Rigid body stacking. N bodies Solve using 2 body interaction Frequency/wavelength limitation An impulse travels at 1 body/timestep that is 1 body/ It takes M timesteps to travel through M bodies Spooongy! We need something that works at the speed of sound, i.e. ~ 1000 m/s If 1 body ~ 0.1 m, then we must propagate 10000 bodies/s or ~ 167 bodies/timestep thus a 167 body method!! Trend: An approximate solver solves just about this! More brutal approximations enable stacks of up to thousands of bodies to be simulated in real time. Typically these use an iterative methods that boils down to Gauss Seidel. 5

Bottom up iterative impulse solver Basic idea: During each timestep loop through the collision set and solve collisions pair wise, and hope that for each pass/iteration, there will be fewer and/or smaller collisions, until they are eventually all resolved... Treat collisions and contacts in a similar way (i.e. compute an impulse) Each iteration will propagate impulses one body through the system (i.e. we would need ~167 iterations in previous example). Many tricks (and problems): How to choose the order of when you loop through the collision set?! How to avoid cycles (i.e. non convergence)?! A top down method? Can be formulated from a matrix/algebraic formulation of the rigid body problem i.e. the algorithm can actually be derived and better understood, whereas it is more like invented in this bottom up approach. Bridson, Guendelman, Fedkiw method Guendelman, E., Bridson, R. and Fedkiw, R., ʺNonconvex Rigid Bodies with Stackingʺ, SIGGRAPH 2003, ACM TOG 22, 871 878 (2003). http://graphics.stanford.edu/papers/rigid_bodies sig03/ Follow ups: Weinstein, R., Teran, J. and Fedkiw, R., ʺDynamic Simulation of Articulated Rigid Bodies with Contact and Collisionʺ, IEEE TVCG, (in press). http://graphics.stanford.edu/~rachellw/prestabilization.html D. M. Kaufman, T. Edmunds, and D. K. Pai, ``Fast Frictional Dynamics for Rigid Bodiesʹʹ in Proceedings of ACM SIGGRAPH 2005, Aug 2005. http://www.research.rutgers.edu/~kaufman/ffdfrb.html Very much inspired by previous work by, Hahn, Steward, Mirtich and many others. See text book for more references. 6

Bridson, Guendelman, Fedkiw method Bridson, Guendelman, Fedkiw method Uses Newton Coulomb impulses. Separates collisions from contacts and treats them separately in a cleaver way! In it s simplest version reuses original collision set throughout the timeset. Uses shock propagation and a pre determined direction (gravity) to avoid loops and minimize errors. Ends with a position correction method that attempts to remove overlaps that still exist after the approximate solver has delivered. 7

Bridson, Guendelman, Fedkiw method Algorithm: 1. Find intersections 2. Flag non separating intersections 3. Collision loop over non separating intersections i. Loop sequentially over rigid body pairs, and their non separating points, resolving the collisions, by instantaneously updating translational and angular velocity, and linear and angular momentum. ii. After each full pass through the non separating set, remove all points that now are separations. iii. Repeat N times (N= ~ 5 15) 4. Add external forces, i.e. gravity, air friction, and time integrate the linear and angular momentum, linear and angular velocities. Do not update positions yet! 5. From the previous iteration, there may still be un resolved collisions that must be resolved. In addition teh velocity integration (e.g. gravity) will have introduced new collisions. Thus, flag all non separating contacts in the original contact set. These will now all be treated as resting contacts. 6. Collision loop over non separating intersections to put them to rest i. Loop over bodies, and their non separating contacts to compute NC impulses and new velocities. Each pass through all non separating contacts is one iteration. ii. Start with a negative restitution e = 1 and for each iteration gradually take it down to 0 (e.g. 0.8 0.6 0.4 0.2 0.0 for 5 iterations). Thus we will slowly damp the collision and finally put it to rest (provided the algorithm actually converges. Use N ~ 10 20 iterations. 7. Use our new velocities and time integrate for new positions. 8. Check the original contact set (from 2). If these are still overlapping, then do a position correction loop on these contact pairs: i. Sometimes called first order physics. Instead of computing an impulse, simply loop through the contact pairs, and separate them along the normal so that the penetration depth becomes zero. Let the separation be inversly proportional to the mass of the body, so that lighter bodies are moved further than heavy bodies (i.e. a fixed plane doesn t move at all). ii. Since contact pair are dependent, repeat also this process with an iterative loop. In the first step only separate a fraction of the penetration depth, in the second, separate more, etc. So that the last iteration attempts to do a complete separation. Use ~5 10 iterations. 8