3D Graphics for Game Programming Chapter XII Physics-based Simulation.

Slides:



Advertisements
Similar presentations
Session System of Particle - 3. Session System of Particle - 3.
Advertisements

Ch. 9 Linear Momentum.
CHAPTER 8 Momentum & Impulse.  Momentum is a product of mass and velocity  Momentum is a vector (magnitude and direction)  p = m v  Measured in kg.
Kinetics of Particles Impulse and Momentum.
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
Chapter 9: Impulse, Momentum, and Collisions  Up to now we have considered forces which have a constant value (except the spring) throughout the motion.
Kinetic energy. Energy Energy is usually defined as the capacity to do work. One type of energy is kinetic energy.
Linear Impulse − Momentum
Chapter 15: Kinetics of a Particle: Impulse and MomentumTextbook: Engineering Mechanics- STATICS and DYNAMICS- 11th Ed., R. C. Hibbeler and A. Gupta Course.
Physics Montwood High School R. Casao
Center of Mass and Linear Momentum
Angular Impulse Chapter 13 KINE 3301 Biomechanics of Human Movement.
Chapter 5 Rotation of a Rigid Body. §5-5 Angular Momentum of a rigid Body Conservation of Angular Momentum §5-1 Motion of a Rigid body §5-2 Torque The.
Monday, November 3 Review for Exam III Chapters 6, 7, 8(springs only) 9.
Chapter 4.2 Collision Detection and Resolution. 2 Collision Detection Complicated for two reasons 1. Geometry is typically very complex, potentially requiring.
Chapter 6 Momentum and Collisions. Momentum The linear momentum of an object of mass m moving with a velocity v is defined as the product of the mass.
ENGR 215 ~ Dynamics Sections Impulse and Linear Momentum In this section we will integrate the equation of motion with respect to time and.
1 Geometry A line in 3D space is represented by  S is a point on the line, and V is the direction along which the line runs  Any point P on the line.
Linear Momentum and Collisions
Center of Mass and Momentum Lecture 08 Monday: 9 February 2004.
1cs533d-term Notes  list Even if you’re just auditing!
Chapter 7 Impulse and Momentum.
Computer graphics & visualization Collision Detection – Narrow Phase.
1© Manhattan Press (H.K.) Ltd. Work Energy Energy 3.6 Work, energy and power Power Power.
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Linear Momentum and Collisions المحاضرة العاشرة. Linear Momentum and Collisions Chapter 9.
Momentum, Impulse, And Collisions
Ch. 8 Momentum and its conservation
Chapter 6 Momentum and Collisions. Chapter Objectives Define linear momentum Compare the momentum of different objects Describe impulse Conservation of.
Force and Momentum Chapter 1. Reminders from GCSE Momentum is a measure of how easy or difficult it is to change the motion of a body –The greater the.
CHAPTER 13 Kinetics of Particles: Energy and Momentum Methods.
CHAPTER 12:PART 1 THE CONDITIONS OF LINEAR MOTION
Chapter 9: Momentum and Conservation Newton’s Laws applied.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Collisions & Contact.
Potential Energy and Conservative Forces
REVISION MOMENTUM. the product of an object's mass and its velocity a vector quantity with the same direction as the velocity of the object. MOMENTUM.
Chapter 17 PLANE MOTION OF RIGID BODIES: ENERGY AND MOMENTUM METHODS
KINETICS OF PARTICLES: ENERGY AND MOMENTUM METHODS s2s2 A1A1 A2A2 A s1s1 s drdr F  ds Consider a force F acting on a particle A. The work of F.
Linear Momentum Impulse & Collisions. What is momentum?  Momentum is a measure of how hard it is to stop or turn a moving object.  What characteristics.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Physics for Games Spring 2012.
Spring Rigid Body Simulation. Spring Contents Unconstrained Collision Contact Resting Contact.
Momentum and Collisions Linear Momentum The linear momentum of a particle or an object that can be modeled as a particle of mass m moving with a velocity.
The total mechanical energy may or may not be conserved
The Laws A section in the chapter of the study of Dynamics of motion.
Monday, October 5, 1998 Chapter 5: Springs Chapter 6: Linear Momentum Conservation of Momentum Impulse.
Linear Momentum The linear momentum p of an object of mass m with a velocity of v is It is a vector and points in the same direction as the velocity.
Chapter 14 Systems of Particles.
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Unit 2 Momentum and Impulse An Introduction to Momentum.
Real-time fluid physics library The goal was to create a physics library, specialized on water fluid physics, for real-time applications.
Momentum and Collisions Conservation of Momentum Chapter 6: Section 2.
Sect. 9.2: Impulse & Momentum
8 Momentum The law of conservation of momentum states that, in the absence of an external force, the momentum of a system remains unchanged. 8.4 Conservation.
8 Momentum The law of conservation of momentum states that, in the absence of an external force, the momentum of a system remains unchanged. 8.4 Conservation.
Today: (Ch. 7) Momentum and Impulse Conservation of Momentum Collision.
CS-378: Game Technology Lecture #15: Physically Based Simulation
Collisions don’t just occur in one dimension, as we have been studying; they also occur in two or three dimensions.
Section C: Impulse & Momentum
Linear Momentum Impulse & Collisions.
Chapter 9: Momentum and Conservation
Chapter 9: Linear Momentum and Collisions
1.
Motion in Real and Virtual Worlds
Momentum.
Computer Animation Algorithms and Techniques
Impulse and Momentum Readings: Chapter 9.
AS-Level Maths: Mechanics 1 for Edexcel
Collisions Chapter 4.
Presentation transcript:

3D Graphics for Game Programming Chapter XII Physics-based Simulation

3D Graphics for Game Programming Physics-based Simulation  Physics-based simulation  Collision detection, which concerns the problems of determining whether, when, and where two or more objects come into contact  Collision resolution, which describes how the objects move after collision  This chapter presents two methods for collision resolution  Penalty method  Impulse method

3D Graphics for Game Programming Penalty Method  Consider a particle falling into the ground. Assume that the y-axis of the world space is upward and the zx-plane corresponds to the ground. Then, collision is detected when the y-coordinate of the particle's position becomes zero or negative. This is the simplest example of collision detection!  A spring has the rest length l r and the stiffness constant k s. It is stretched along the opposite direction of n. If the stretched length is l s, the spring force is defined to be k s (l s - l r )n.

3D Graphics for Game Programming Penalty Method (cont’d)

3D Graphics for Game Programming Penalty Method (cont’d)  The penalty method is easy to implement, and the spring force adopted in the method is neatly integrated with other forces such as gravity.  However, the penalty method often reveals a serious problem.  Suppose that k s is underestimated, i.e., is set to a smaller value than desired. Then, the spring force becomes small, leading to small vectors for acceleration and velocity. As a result, the new position might be still under the ground.  In contrast, overestimated k s may lead to an overly large velocity, and the particle might overshoot in an unrealistic manner.

3D Graphics for Game Programming Impulse Method  Momentum (p) is defined to be mass (m) times velocity (v), i.e., p = mv.  The principle of conservation of momentum

3D Graphics for Game Programming Impulse Method (cont’d)  The best example for demonstrating the impulse method is the billiard game.  Collision detection between two billiard balls is straightforward.  Contact point and contact normal

3D Graphics for Game Programming Impulse Method (cont’d)  The approaching velocity is decomposed into the normal velocity and the tangential velocity, as shown in (a).  After collision, the normal velocities are changed, but the tangential velocities remain constant. Therefore, only the normal velocities will be considered for collision resolution.  In (b), the normal velocity of each ball is zero, and consequently no collision resolution is needed.  The momentum in the tangential direction is conserved for each ball because the tangential velocity remains constant. In contrast, the normal velocity changes, and so does the momentum in the normal direction.  The impulse (change in momentum) occurs along the normal direction only.

3D Graphics for Game Programming Impulse Method (cont’d)  Note that v r of the equation in the box can be restricted to the normal component of the relative approaching velocity.

3D Graphics for Game Programming Impulse Method (cont’d)  Let’s see another example.

3D Graphics for Game Programming Collision Detection  In general, collision detection requires intersection tests among the triangles. If each object is composed of 1K triangles, for example, we would need 1M triangle-triangle intersection tests, which are obviously expensive.  To save the computing cost, collision detection algorithms are usually implemented in two phases.  The broad phase excludes all parts of the objects that are out of the bounds of possibility of collision and identifies the remains as the potentially colliding set (PCS).  The narrow phase performs the pairwise triangle tests within the PCS.

3D Graphics for Game Programming Collision Detection (cont’d)  The broad phase typically uses the bounding volumes.

3D Graphics for Game Programming Collision Detection (cont’d)  The bounding volumes are typically organized in a hierarchy.

3D Graphics for Game Programming Collision Detection (cont’d)  Collision detection using the bounding volume hierarchies. A A1A1 A2A2 B B1B1 B2B2 A and B A 1 and B A 2 and B A 1 and B 1 A 1 and B 2 triangle-triangle test

3D Graphics for Game Programming Collision Resolution  Triangle-triangle Intersection

3D Graphics for Game Programming Collision Resolution (cont’d)  So far, we have considered only linear accelerations for physics-based simulation. When a force is applied to an object, however, the force may induce angular accelerations.