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

Similar documents
Collision Resolution

PHYSICS I RESOURCE SHEET

Today s lecture. WEST VIRGINIA UNIVERSITY Physics

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

IMPACT Today s Objectives: In-Class Activities:

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

IMPACT (Section 15.4)

PLANAR KINETIC EQUATIONS OF MOTION (Section 17.2)

Thursday Simulation & Unity

Final Exam. June 10, 2008, 1:00pm

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

r CM = ir im i i m i m i v i (2) P = i

Review of Forces and Conservation of Momentum

z F 3 = = = m 1 F 1 m 2 F 2 m 3 - Linear Momentum dp dt F net = d P net = d p 1 dt d p n dt - Conservation of Linear Momentum Δ P = 0

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

Study Guide For Midterm - 25 weeks Physics Exam. d. the force exerted by a towing cable on the car. c. the upward force the road exerts on the car.

Part Two: Earlier Material

Rigid Body Dynamics and Beyond

Kinetics of Particles: Work and Energy

Chapter 8- Rotational Motion

Mechanics Topic B (Momentum) - 1 David Apsley

Date Period Name. Write the term that correctly completes the statement. Use each term once. elastic collision

Physics 218 Lecture 23

APPLIED MATHEMATICS AM 02

STEP Support Programme. Mechanics STEP Questions

Exam II. Spring 2004 Serway & Jewett, Chapters Fill in the bubble for the correct answer on the answer sheet. next to the number.

EN40: Dynamics and Vibrations. Final Examination Wed May : 2pm-5pm

UNIVERSITY OF SASKATCHEWAN Department of Physics and Engineering Physics

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

Conservation of Momentum

Conservation of Momentum. Last modified: 08/05/2018

Chapter 9 Linear Momentum and Collisions

Chapter Work, Energy and Power. Q1. The co-efficient of restitution e for a perfectly elastic collision is [1988] (a) 1 (b) 0 (c) (d) 1 Ans: (a)

Chapter 14 Periodic Motion

Welcome back to Physics 211

WORK, POWER AND ENERGY

Physics 141. Lecture 18. Frank L. H. Wolfs Department of Physics and Astronomy, University of Rochester, Lecture 18, Page 1

Mechanics. Time (s) Distance (m) Velocity (m/s) Acceleration (m/s 2 ) = + displacement/time.

3. Kinetics of Particles

Exam 3 Practice Solutions

Forces. Prof. Yury Kolomensky Feb 9/12, 2007

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

APPLICATIONS. CEE 271: Applied Mechanics II, Dynamics Lecture 17: Ch.15, Sec.4 7. IMPACT (Section 15.4) APPLICATIONS (continued) IMPACT READING QUIZ

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

The SI units of mass are kilograms (kg) and of velocity are meters / second (m/s). Therefore, the units of momentum are kg m/s.

Chapter 9- Static Equilibrium

APPLIED MATHEMATICS IM 02

APPLIED MATHEMATICS ADVANCED LEVEL

Review for 3 rd Midterm

Announcements. 1. Do not bring the yellow equation sheets to the miderm. Idential sheets will be attached to the problems.

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

PH1104/PH114S MECHANICS

Physics 10 Lecture 6A. "And in knowing that you know nothing, that makes you the smartest of all. --Socrates

Physics 8, Fall 2011, equation sheet work in progress

1 Forces. 2 Energy & Work. GS 104, Exam II Review

Momentum Conceptual Questions. 1. Which variable has more impact on an object s motion? Its mass or its velocity?

Assignment 4: Rigid Body Dynamics

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

Extra credit assignment #4 It can be handed in up until one class before Test 4 (check your course outline). It will NOT be accepted after that.

AP Physics C. Momentum. Free Response Problems


AP PHYSICS C Momentum Name: AP Review

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

where G is called the universal gravitational constant.

Announcements. There will still be a WebAssign due this Friday, the last before the midterm.

Essential Physics I. Lecture 9:

Physics 8 Monday, October 28, 2013

Physics 12 Final Exam Review Booklet # 1

Physics 5A Final Review Solutions

When particle with mass m moves with velocity v, we define its Linear Momentum p as product of its mass m and its velocity v:

Lab 8: Ballistic Pendulum

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

PHY 101. Work and Kinetic Energy 7.1 Work Done by a Constant Force

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

Passive Dynamics and Particle Systems COS 426

Northwestern CT Community College Course Syllabus. Course Title: CALCULUS-BASED PHYSICS I with Lab Course #: PHY 221

AP PHYSICS 1 Learning Objectives Arranged Topically

Northwestern Connecticut Community College Course Syllabus

Ch 7 Impulse-Momentum Theorem, Conservation of Momentum, and Collisions

Quiz Number 4 PHYSICS April 17, 2009

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

14300 Dynamics Carts w/o Hoops Teachers Instructions

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

III. Work and Energy

Exam 2--PHYS 101--F11--Chapters 4, 5, & 6

Distance travelled time taken and if the particle is a distance s(t) along the x-axis, then its instantaneous speed is:

23. A force in the negative direction of an x-axis is applied for 27ms to a 0.40kg ball initially moving at 14m/s in the positive direction of the

Motion. Argument: (i) Forces are needed to keep things moving, because they stop when the forces are taken away (evidence horse pulling a carriage).

LINEAR MOMENTUM AND COLLISIONS

OCR Physics Specification A - H156/H556

Lecture 18. Newton s Laws

Physics 8, Fall 2013, equation sheet work in progress

PHYSICS 221, FALL 2011 EXAM #2 SOLUTIONS WEDNESDAY, NOVEMBER 2, 2011

Physics 1C. Lecture 12B

PY205N Spring The vectors a, b, and c. are related by c = a b. The diagram below that best illustrates this relationship is (a) I

Lecture 13. Collisions. and Review of material. Pre-reading: KJF 9.5. Please take an evaluation form

Rotational & Rigid-Body Mechanics. Lectures 3+4

Pleeeeeeeeeeeeeease mark your UFID, exam number, and name correctly. 20 problems 3 problems from exam 2

FENG CHIA UNIVERSITY

CS229 Programming Assignment 3: Dynamics

Transcription:

Projects Dynamics II Forces, Collisions and Impulse Presentations: Dates: Week 0: Mon, Feb 6 Week 0: Wed, Feb 8 Finals Week: Tues, Feb 4 (:30 :30) room TBA 5 minutes / presentation Schedule now on Web Please send me choice of time/day Assignments Assignment -- Framework Some have been graded If not submitted please do so. Assignment -- Keyframing Due Mon, Jan. Questions? Assignment 3 -- Billiards To be given Monday. Plan Physics 0 for rigid body animation Monday: translation and rotational dynamics Today: Forces, impacts, and collisions Next Monday: Numerical integration. Next Wednesday: Applications (including particle systems) But first Motivational Films Educational animations by Jim Blinn Motivational Film Mathematica: The Theorem of Pythagoras (988) JPL Cal Tech Now at Microsoft

Motivational Film The Mechanical Universe (984) Let s get started Physics for Rigid Body Dynamics Last class: Linear/ Rotational Motion Today: Collisions Wednesday: Numerical Integration Laws of Motion Linear Motion Law I Every object in a state of uniform motion tends to remain in that state of motion unless an external force is applied to it. (Inertia) Law II: The acceleration of a body is proportional to the resulting force acting on the body, and this acceleration is in the same direction as the force. Law III: For every action there is an equal and opposite reaction. For Linear Physical Motion Mass Measure of the amount of matter in a body From Law II: Measure of the a body s resistance to motion Velocity Change of motion with respect to time Acceleration Change of velocity with respect to time Force In short, force is what makes objects accelerate Momentum mass x velocity Another way of stating Law I: Momentum is conserved Rotational Motion For Rotational Physical Motion Inertia Measure of the amount/distribution of matter in a body From Law II: Measure of the a body s resistance to motion Angular Velocity Change of rotation with respect to time Angular Acceleration Change of velocity with respect to time Torque In short, torque is what makes objects rotate Angular Momentum Inertia x velocity Another way of stating Law I: Momentum is conserved Where we are Object properties Position, orientation Linear and angular velocity Linear and angular momentum mass Update object properties Calculate forces Calculate accelerations Using mass, momenta

Where we are State of object at any given time s( t) R( t) S( t) = M ( t) L( t) position rotation (in world coords) momentum angular momentum Where we are Derivative of object state s& ( t) v( t) R& ( t) ( t) R( t) S& ω ( t) = = M& ( t) F( t) L& ( t) τ ( t) Putting it all together Step Calculate Forces, F(t), τ(t) Step Integrate position/rotation s(t +Δt) = s(t) + v(t)δt R(t +Δt) = R(t) + (ω(t)*r(t)) Δt /* CAREFUL HERE */ r(t +Δt) = s(t +Δt) + r body R(t +Δt) Update Momentum (integrate accelleration) M(t +Δt) = M(t) + F(t) Δt L(t +Δt) = L(t) + τ(t) Δt Putting it all together Step Calculate Forces, F(t), τ(t) Step Integrate position/rotation s(t +Δt) = s(t) + v(t)δt q(t +Δt) = q(t) + 0.5 (ω(t)q(t)) Δt /* normalize to avoid problems */ R(t +Δt) = quattorot (q(t +Δt) ) r(t +Δt) = s(t +Δt) + r body R(t +Δt) Update Momentum (integrate accelleration) M(t +Δt) = M(t) + F(t) Δt L(t +Δt) = L(t) + τ(t) Δt Putting It all together Step 3 Calculate velocities (for next step) v(t +Δt) = M(t +Δt)/m I - (t +Δt) = R(t +Δt)I - body R(t +Δt)T ω(t +Δt) = + I - (t +Δt)L(t +Δt) Go to step Questions? Useful forces Gravity Friction Impulse Spring Wind Add your own 3

Gravity Gravity is an attractive force between all pairs of massive objects in the universe. The gravitational force between two objects is given by a (fairly) simple mathematical equation. m m F = G r Where m and m are the masses of the two objects r is the distance between the two objects G is the universal gravity constant = 6.67 x 0 - Nm / kg Gravity For objects interacting on this earth, the acceleration due to gravity can be calculated using the radius of the earth. g = 9.8 m / sec g = 3 ft / sec This acceleration is always towards the earth s surface. Friction Arises from interaction of surfaces in contact. Always works against the direction of relative motion of two objects. Friction Static Friction For objects not in motion Fraction of the normal component of force Amount of force need to get object from rest moving Kinetic friction For objects in motion Fraction of the normal component of force Amount of resistance due to friction Static Friction Kinetic Friction Supporting object Resting contact Normal force F F s F N Supporting object Resting contact Normal force F F k F N v Static friction F s = u s * F N Kinetic friction F k = u k * F N 4

Friction Surfaces u s u k Dry glass on glass 0.94 0.4 Dry iron on iron. 0.5 Dry rubber on pavement 0.55 0.4 Dry steel on steel 0.78 0.4 Dry Teflon on Teflon 0.04 0.04 Dry wood on wood 0.38 0. Ice on Ice 0. 0.03 Oiled steel on steel 0. 0.08 Springs Force applied by stretching a spring. Given by Hooke s Law restoring force due to a spring is proportional to the length that the spring is stretched acts in the opposite direction. F = -kx Springs Hooke s Law F = -kx k = spring constant Given in N/m Large k stronger springs Small k looser springs Springs Damping Decreases spring force proportional to velocity Springs Damping Damping specified by damping coefficient, k d Damping and Springs F = kx k d dx dt Springs Useful for: Simulate collections of connected particles or rigid bodies Example: cloth, paper, etc. Damping required to make solutions stable Can also be used in collision detection (impulse forces) 5

Wind Define a force field Force varies in space and time Add your own Most difficult part is mathematically describing the force Wind, turbulence See Wejchert paper in READING LIST Physics for game development book has a bunch Questions Impulse Law III: For every action there is an equal and opposite reaction. Impulse is the equal and opposite reaction after a collision Impulse Impulse A force that acts over a very short period of time. Gives change in momentum + t Linear Impulse = F ( t) dt = M after M before t + t Angular Impulse = τ (t)dt = L after L before t Impulse and Collision At the time of collision, each object applies an impulse force on the other. Magnitude is the same Opposite in Direction Following Law III Collisions Law says that momentum is conserved When objects collide with masses m and m Velocities v and v ( v + mv) before = ( mv + mv m ) after Link http://www.phy.ntnu.edu.tw/ntnujava/index.php? topic=5.0 6

Kinetic Energy Energy required to accelerate a body from rest KElinear = mv KEangular = Energy is conserved Iω Types of collisions Elastic Kinetic energy is conserved No kinetic energy is lost Example: flubber super ball Inelastic All kinetic energy is lost Colliding objects stick together Energy converted to heat, sound, damage Example: clay falling on a hard floor Coefficient of restitution Most collisions lie somewhere between perfectly elastic and perfectly inelastic Gives a measure of the elasticity during an impact ( v v) e = ( v v ) after before Coefficient of restitution Perfectly elastic = Perfectly inelastic = 0 Most collisions Somewhere between 0 and Link http://www.phy.ntnu.edu.tw/ntnujava/ index.php?topic=4.0 Line of action Line of action Line perpendicular to the colliding surfaces Central The line of action passes through the center of mass Always true for spheres Direct Velocities is along the line of action Oblique The velocities are not along the line of action Line of action 7

Impulse Force is a vector Only velocities along line of action need be considered Link Calculating Impulse Force Linear Remember J = m v v ) J = m v v ) ( after before ( v v) e = ( v v ) after before ( after before Calculating Impulse Forces Calculating Impulse Force Linear After doing some algebra ( v v) before( e + ) J = + m m Note: J and v s are scalar giving the values along the line of action Calculating new velocities Once we know J Calculating Impulse Force Angular Jn v after = v before + m v after = v before Jn m Where n is a normalized vector along the line of action. Here, J is a scalar giving the impulse along the line of action Two more unknowns to deal with (ω after for each object) 8

Calculating Impulse Force Separate velocity into components r body (t) = v(t) + ω(t) r body Calculating Impulse Force Luckily we have 4 equations from linear impulse v after + (ω after r ) = (Jn) m + v before + (ω before r ) v after + (ω after r ) = (Jn) m + v before + (ω before r ) from angular impulse (r Jn) = I (ω after ω before ) (r Jn) = I (ω after ω before ) Calculating Impulse Forces Calculating Impulse Force After doing some more algebra ( v v) before( e + ) J = + + n m m [ I ( r n) ] r + n [ I ( r n) ] r Where n a unit vector normal to the surface of contact The v s are scalar velocities along the line of action. Calculating new velocities Once we know J Jn v after = v before + v m after = v before Jn m Questions Let s take a break ω after = ω before + I (r Jn) ω after = ω before + I (r Jn) 9

Collisions and Animation Answers the question, was there a collision Collision Determination If there is a collision, when and where did it occur? Collision Response How does the collision affect the motion of the objects involved? Strictly a kinematic issue Based on position and orientation of objects and how they change over time. Can be determined when after a given time step one object penetrates another Penetrating objects Be careful positions are only approximations False positive okay Missed positive bad Penetrating objects Complexity will depend upon objects being tested for penetration There are many good algorithms and free libraries for collision detection of planar convex polyhedra See Web Page for Survey paper. Major Challenge in collision detection Must check collision of each pair of objects General problem is O(N ) Multiple collisions in a single time step. Efficient collision detection for real time applications is still an active research area Tips Similar to tips for intersection testing for ray tracing Use hierarchical bounding volumes Place simple objects (i.e sphere or box) around complex objects Do initial intersection tests on bounding objects. If ray intersects bounding volume, then test complex bounded object 0

hierarchical bounding volumes hierarchical bounding volumes Considerations Ease of detection Bounding efficiency Other Tips You need only test moving objects for collisions (remember Law ) However, you must test against all other objects, moving or stationary - Spatial Subdivision Subdivide your scene volume into hierarchical regions Create a tree structure that indicates for each region: if the region is empty the object present at that particular region Test collision with objects in volume - Spatial Subdivision Motivation Without spatial subdivision, you will need to query all objects/polygons and test for intersection With spatial subdivision, you know which objects are in which volume so you only test objects that are in the volumes where an object traveling. - Spatial Subdivision Examples Octrees Recursively subdivide volume into equal regions. If subregion is empty, then stop Otherwise further subdivide subregion. Continue until each subregion is empty or contains a single object. BSPTrees Like Octrees but divides space into a pair of subregions Subregions need not be equally spaced Planes separating regions can be placed at object boundaries.

-- Octrees -- Octrees Images from flipcode.com -- Octrees -- BSPTree - Spatial Subdivision Issues Must rebuild tree at each time step Tradeoff Time to build tree vs. Time to check for collisions BSP/OctTrees for static objects Questions? Collision Determination If a collision has been detected, the time and point of impact must be determined By the time a collision is detected, one object has already penetrated another I.e. Collision occurred between time steps Need to backup simulation to the point when collision took place.

Collision Determination Binary search strategy No collision at time t Penetration at time t + Δt Test point at time t between t and t + Δt iterative. If No Collision, test at time between t and t + Δt Else test at time between t and t Iterate until a predefined tolerance is achieved. Point at t i- Collision Determination Linear interpolation strategy s L t = t i + s/l (t i t i- ) Point at t Collision Response Once we have the actual time and point of collision, we can use formula in first half to determine impulse force and new velocities. Collision Response Penalty Method Rather than applying kinematic equations, use a spring to approximate the impulse force. ( v v) before( e + ) J = + + n m m [ I ( r n) ] r + n [ I ( r n) ] r Collision Response Recall Spring force given by Hooke s Law F = -kx Where x is the displacement of the spring k is a spring constant Collision Response Penalty Method Pros Ease of implementation No need to step back to time of collision No need to mess with complex kinematic equations Cons How does one choose k? Must choose carefully else solution may become unstable or in accurate Simply a hueristic hack Your mileage may vary! 3

To sum up Answers the question, was there a collision Collision Determination If there is a collision, when and where did it occur? Collision Response How does the collision affect the motion of the objects involved? Questions? Putting it all together Object properties Position, orientation Linear and angular velocity Linear and angular momentum mass Update object properties Calculate forces Calculate accelerations Using mass, momenta Putting it all together Step Calculate Forces, F(t), τ(t) Step Integrate position/rotation s(t +Δt) = s(t) + v(t)δt q(t +Δt) = q(t) + 0.5 (ω(t)q(t)) Δt /* normalize to avoid problems */ R(t +Δt) = quattorot (q(t +Δt) ) r(t +Δt) = s(t +Δt) + r body R(t +Δt) Update Momentum (integrate accelleration) M(t +Δt) = M(t) + F(t) Δt L(t +Δt) = L(t) + τ(t) Δt Putting it all together Step 3 Calculate velocities (for next step) v(t +Δt) = M(t +Δt)/m + impulse velocity I - (t +Δt) = R(t +Δt)I - body R(t +Δt) T ω(t +Δt) = I - (t +Δt)L(t +Δt) + impulse velocity Go to step Questions? Video Let s see how this all looks when assembled properly Rigid Body Dynamics By James Hahn (also at Ohio State at the time) Accompanying video to his paper B-D Tree By Doug L. James (CMU) If falling chairs is your thing. Next Time Numerical Integration Assignment #3 Questions? 4