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

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

CS-184: Computer Graphics

General Definition of Torque, final. Lever Arm. General Definition of Torque 7/29/2010. Units of Chapter 10

Kinematics (special case) Dynamics gravity, tension, elastic, normal, friction. Energy: kinetic, potential gravity, spring + work (friction)

Simulation in Computer Graphics Elastic Solids. Matthias Teschner

Torque/Rotational Energy Mock Exam. Instructions: (105 points) Answer the following questions. SHOW ALL OF YOUR WORK.

GAME PHYSICS ENGINE DEVELOPMENT

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

Rotation. I. Kinematics - Angular analogs

DEVIL PHYSICS THE BADDEST CLASS ON CAMPUS AP PHYSICS

Chapter 11. Angular Momentum

Assignment 4: Rigid Body Dynamics

PHYSICS I RESOURCE SHEET

CS 480/680: GAME ENGINE PROGRAMMING

Center of Gravity Pearson Education, Inc.

Rigid body simulation. Once we consider an object with spatial extent, particle system simulation is no longer sufficient

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

Chapter 9- Static Equilibrium

General Physics (PHY 2130)

Dynamics. Dynamics of mechanical particle and particle systems (many body systems)

Physics A - PHY 2048C

Chapter 8. Rotational Equilibrium and Rotational Dynamics

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

Thursday Simulation & Unity

Rotational & Rigid-Body Mechanics. Lectures 3+4

Lecture 13 REVIEW. Physics 106 Spring What should we know? What should we know? Newton s Laws

Torque and Rotation Lecture 7

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

DEVIL PHYSICS THE BADDEST CLASS ON CAMPUS AP PHYSICS

Modeling and Solving Constraints. Erin Catto Blizzard Entertainment

Physics 2A Chapter 10 - Rotational Motion Fall 2018

Lesson Rigid Body Dynamics

Manipulator Dynamics 2. Instructor: Jacob Rosen Advanced Robotic - MAE 263D - Department of Mechanical & Aerospace Engineering - UCLA

AP PHYSICS 1 Learning Objectives Arranged Topically

Review for 3 rd Midterm

Rigid Body Dynamics and Beyond

Chapter 11. Angular Momentum

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

( )( ) ( )( ) Fall 2017 PHYS 131 Week 9 Recitation: Chapter 9: 5, 10, 12, 13, 31, 34

DEVIL PHYSICS THE BADDEST CLASS ON CAMPUS AP PHYSICS

1. The first thing you need to find is the mass of piece three. In order to find it you need to realize that the masses of the three pieces must be

Torque and Static Equilibrium

CS229 Programming Assignment 3: Dynamics

Physics 8 Monday, October 28, 2013

A. Incorrect! It looks like you forgot to include π in your calculation of angular velocity.

Torques and Static Equilibrium

GIANCOLI READING ACTIVITY Lesson 8-4

Lecture 6 Physics 106 Spring 2006

Cross Product Angular Momentum

Preliminary Examination: Classical Mechanics Department of Physics and Astronomy University of New Mexico Spring 2010

Rotational N.2 nd Law

Rotational motion problems

Rotational Motion About a Fixed Axis

Chapter 11 Rotational Dynamics and Static Equilibrium. Copyright 2010 Pearson Education, Inc.

Downloaded from

PH1104/PH114S - MECHANICS

IB PHYSICS OPTION: ENGINEERING PHYSICS. Atit Bhargava

Angular Momentum L = I ω

Exam 3 Practice Solutions

Visual Interactive Simulation, TDBD24, Spring 2006

III. Work and Energy

AP Pd 3 Rotational Dynamics.notebook. May 08, 2014

. d. v A v B. e. none of these.

Summer Physics 41 Pretest. Shorty Shorts (2 pts ea): Circle the best answer. Show work if a calculation is required.

Slide 1 / 37. Rotational Motion

Angular Momentum L = I ω

Vectors for Physics. AP Physics C

CHAPTER 8 CONSERVATION LAWS

= o + t = ot + ½ t 2 = o + 2

Chapter 8 Rotational Equilibrium and Rotational Dynamics Force vs. Torque Forces cause accelerations Torques cause angular accelerations Force and

Physics 8 Friday, October 20, 2017

PHYS 185 Final Exam December 4, 2012

Physical Simulation. October 19, 2005

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

Chapter 15 Periodic Motion

Symmetries 2 - Rotations in Space

Angular Momentum. Physics 1425 Lecture 21. Michael Fowler, UVa

Chapter 10: Dynamics of Rotational Motion

CHAPTER 9 ROTATIONAL DYNAMICS

AP Physics C 2015 Summer Assignment

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

Rigid bodies - general theory

Fundamentals Physics

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

Rotation. Rotational Variables

3 Space curvilinear motion, motion in non-inertial frames

Physics 8, Fall 2011, equation sheet work in progress

GAME PHYSICS (INFOMGP) FINAL EXAM

Application of Forces. Chapter Eight. Torque. Force vs. Torque. Torque, cont. Direction of Torque 4/7/2015

Rotational Kinematics

Mechanics II. Which of the following relations among the forces W, k, N, and F must be true?

Torque. Physics 6A. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

Phys101 Second Major-173 Zero Version Coordinator: Dr. M. Al-Kuhaili Thursday, August 02, 2018 Page: 1. = 159 kw

Lecture 8. Torque. and Equilibrium. Pre-reading: KJF 8.1 and 8.2

Robotics. Dynamics. Marc Toussaint U Stuttgart

Kinetics of Particles: Work and Energy

PLANAR KINETIC EQUATIONS OF MOTION (Section 17.2)

Center of Gravity. The location of the center of gravity is defined by: n mgx. APSC 111 Review Page 7

Rotational Kinematics and Dynamics. UCVTS AIT Physics

Circular Motion, Pt 2: Angular Dynamics. Mr. Velazquez AP/Honors Physics

Transcription:

PSE Game Physics Session (6) Angular momentum, microcollisions, damping Oliver Meister, Roland Wittmann 23.05.2014 Session (6)Angular momentum, microcollisions, damping, 23.05.2014 1

Outline Angular momentum Angular velocity - starting point Torque Angular momentum Session (6)Angular momentum, microcollisions, damping, 23.05.2014 2

Angular velocity - starting point With our quaternions, we are able to setup the rotation of an object. Question: How to express the angular velocity in 3D? Describe the angular velocity v r by a simple vector: v r = s r that is a product of the norm of the angular speed s and the normalized axis of rotation r. v r r s Remark: s corresponds to the time derivative θ of the rotation angle θ and has the unit angle per second. Session (6)Angular momentum, microcollisions, damping, 23.05.2014 3

Angular velocity - multiple velocities Translational velocities are additive under composition: v = v 1 + v 2 Angular velocities are additive under composition, too (although the explanation is not trivial): v r = v r1 + v r2 Session (6)Angular momentum, microcollisions, damping, 23.05.2014 4

Angular velocity - from acceleration to velocity For the translational acceleration, we used the explicit Euler to approximate the updated velocity: v(t + t) = v(t) + t a and an implicit Euler to update the position of the object (using the translate() method in the engine): x(t + t) = x(t) + t v(t + t) For a given angular acceleration α, we can update the angular velocity with a similar method: v r (t + t) = v r (t) + t α What about updating the rotation? q(t + t) =??? Session (6)Angular momentum, microcollisions, damping, 23.05.2014 5

From angular velocity to quaternions Remember Session (3): Given rotation axis (x, y, z) and angle θ = v r t w cos θ 2 q r := i j = x sin θ 2 y sin θ R R3 2 k z sin θ 2 Computing a single timestep given an angular velocity vector v r, a quaternion can be set up representing the rotation for a single timestep. Thus, you are able to compute the new quaternion of the next timestep: q(t + t) = q(t) q r ( t) Session (6)Angular momentum, microcollisions, damping, 23.05.2014 6

Moving on... So far we (should) know: What an angular velocity vector is. How to rotate an object during each timestep. Update angular velocity of objects using angular acceleration. Update the orientation by converting the angular rotation to a quaternion and applying the rotational quaternion to the one describing the orientation of the object. Next: How to modify the angular velocity of an object OR how to obtain α? Session (6)Angular momentum, microcollisions, damping, 23.05.2014 7

Torque (Drehmoment) Figure: Force acting on object Let s assume to have a directed force F (e. g. created by a spring) exceeded on the point x relative to the center of mass of an object. Then the torque is computed by τ = x F Session (6)Angular momentum, microcollisions, damping, 23.05.2014 8

Multiple Torques Figure: Multiple forces acting on an object We are not only interested in a single torque acting on an object When multiple forces are exceeded on an object, they have to be combined somehow Similar to forces, torques can be added up: τ = i x i F i Session (6)Angular momentum, microcollisions, damping, 23.05.2014 9

Inertia (Massentraegheit) Change of angular velocity due to torque clearly depends on the shape of the object! This information can be expressed in form of the inertia tensor. For spheres and boxes, these tensors are 2 3 mr2.. 1 I Sphere =. 2 mr 2 12 m(w2 + d 2 ).. 3.. 2 mr 2 I Box =. 1 m(h 2 + d 2 ) 12.. 1 m(h 2 + w 2 ) 3 12 See http://en.wikipedia.org/wiki/list_of_moments_of_inertia for more inertia tensors Session (6)Angular momentum, microcollisions, damping, 23.05.2014 10

Inertia (1/2) Similar to the translational force F = m a, we get a formula for the torque depending on the angular acceleration α and the inertia tensor: τ = I α Since we are interested in computing the change in the angular acceleration, we are allowed to rewrite the equation: α = I 1 τ Warning: This formula is valid only in object space!!! However, the forces exerted on the object might only be given in world space. convert to world space Session (6)Angular momentum, microcollisions, damping, 23.05.2014 11

Inertia (2/2) The torque τ is given as a vector Object World space: inverse transposed matrix (see session (2)) World Object space: transposed matrix Putting everything together, the angular acceleration vector is computed by α = M T I 1 M T τ with model matrix M Session (6)Angular momentum, microcollisions, damping, 23.05.2014 12

Angular momentum We start by looking at our simple translational case. There we computed the momentum by p l = m v For angular rotations, we express the angular momentum in a similar way: p r = I v r The angular momentum change created by a translational momentum change at point x on the object is given by p r = x p l Finally we can express the change of angular velocity due to momentum by v r = I 1 p r = I 1 ( x p l ) Session (6)Angular momentum, microcollisions, damping, 23.05.2014 13

Angular collision impulse From the translational case, we know that due to the collision, the velocity has to change to match v s = C r v c and other physical properties. In particular, the velocity of both collision points has to match this formula. Our goal is to compute the impulse which has to be applied to the collision points to match v s. Session (6)Angular momentum, microcollisions, damping, 23.05.2014 14

Step 1) Compute the closing velocity The velocity of a point on the surface of the object is given by v = v r x + v l with angular velocity v r, x as the vector from the center of mass to the collision point and v l the (linear) translational velocity. Session (6)Angular momentum, microcollisions, damping, 23.05.2014 15

Step 1) Compute the closing velocity (con d) Since only the velocity towards the collision normal may be modified (without friction!), this fraction is computed by using the dot product: v c = n v A n v B Now we are able to compute the separating velocity with the same formulas as for the purely translational case. Session (6)Angular momentum, microcollisions, damping, 23.05.2014 16

Step 2) Compute the change in velocity for unit impulse It s problematic to rearrange the formulas to directly compute the amount of impulse which has to be applied to gain a specific separating velocity. Therefore we utilize an important property of the impulse (similar to Newtons 3rd law): When an impulse is exceeded to an object during a collision, an impulse of same magnitude but opposite direction is exceeded to the other object. Important: The direction of the unit impulse of one object aims to the opposite direction of the unit impulse applied to the other object. The change in velocity is computed based on applying a unit impulse to both objects which is explained sucessively in the next slides. Session (6)Angular momentum, microcollisions, damping, 23.05.2014 17

Step 2) Compute the change in velocity for unit impulse (con d) The unit impulse is parallel to the collision normal. Computing the change in translational velocity for the unit impulse is(/should be) known from previous sessions: v l = n m 1 The change in angular velocity is computed using v r = M T I 1 M T }{{} Inertia to world space ( x }{{} lever arm }{{} n ) unit impulse Finally, we compute the change of velocity in the specific point on the object: v = v l + v r x This has to be computed for both objects! Session (6)Angular momentum, microcollisions, damping, 23.05.2014 18

Step 3) Computing the impulse to apply (1/2) So far we know the change of velocity for both collision points. Since the separating velocity only accounts towards the normal, we may consider only the speed in direction of the normal: s = v n The change in separating velocity of both objects when exceeding a unit impulse to both objects is given by simply adding s of both objects (Depending on your implementation, maybe you have to change the sign of one component!) Knowing the closing velocity and the coefficient of restitution, we can compute the separating velocity using the formula C r = v s v c By knowing the separating velocity, we can now compute the fraction f of the unit impulse (i.e. the fraction of the separating velocity) to apply. Session (6)Angular momentum, microcollisions, damping, 23.05.2014 19

Step 3) Computing the impulse to apply (2/2) Current state: We know the fraction of the unit impulse which has to be applied to both objects to gain the separating velocity! There are 2 ways how to apply this impulse: Either we apply the impulse which is now well known by multiplying the fraction f with the unit impulse which has to be applied to gain the separating velocity or we use directly the fraction f to compute the change of translational and angular velocity for each object by using our previously computed variables v l and v r. v l = v l + f v l v r = v r + f v r Session (6)Angular momentum, microcollisions, damping, 23.05.2014 20

Summary (1/2) Steps to resolve a collision: Choose as (initially wrong) impulse the unit vector n (which is the collision normal). For each object, compute the change of linear and rotation velocity ( v l and v r ) in the collision point, that would occur if we applied the unit impulse n (slide 18). For each object, compute the total velocity change v at the collision point by adding up linear velocity and cross product of rotation velocity and lever arm: v = v l + v r x Session (6)Angular momentum, microcollisions, damping, 23.05.2014 21

Summary (2/2) Compute a reasonable fraction f of the unit impulse: Applying the unit impulse to two colliding objects, we would get the separating velocity: v s = v c + ( v 1 + v 2 ) n However, v s does not fulfill the condition (slide 19): v s = C r v c So in order to fulfill the condition, we have to multiply the unit impulse with a fraction f. Since all performed operations are linear, we get: C r v c = v s = v c + f ( v 1 + v 2 ) n Solve the formula by f and set: v l = v l + f v l v r = v r + f v r Session (6)Angular momentum, microcollisions, damping, 23.05.2014 22

Some more hints & comments: Always consider the different spaces (model or world space) in which you re doing the computations. Sometimes you ll have to do some transformations. To gain better results, also the interpenetration has to account for the rotations of objects. Session (6)Angular momentum, microcollisions, damping, 23.05.2014 23