1 Computer Game Physics The very basics. 2 The Basics Force F Mass m Acceleration a: a = F/m Velocity v: v = a*t Position s: s = v*t …if F is constant.

Slides:



Advertisements
Similar presentations
Angular Quantities Correspondence between linear and rotational quantities:
Advertisements

Real-Time Game Physics
Newton’s First Law of Motion Newton’s First Law of Motion.
FORCE Chapter 10 Text. Force A push or a pull in a certain direction SI Unit = Newton (N)
CBA #1 Review Graphing Motion 1-D Kinematics Projectile Motion Circular Motion Gravity Graphing Motion 1-D Kinematics Projectile Motion Circular.
今日課程內容 CH10 轉動 轉動牛頓第二運動定律 轉動動能 轉動慣量 Angular Quantities Here is the correspondence between linear and rotational quantities:
Chapter 11 Angular Momentum
Rotational Motion Chapter Opener. Caption: You too can experience rapid rotation—if your stomach can take the high angular velocity and centripetal acceleration.
Linear Impulse − Momentum
IPC. Newton’s 1st Law of Motion Newton’s 1st Law of Motion – Objects in motion will stay in motion and objects at rest will stay at rest…unless a force.
Chapter 12: Rolling, Torque and Angular Momentum.
Physics 111: Elementary Mechanics – Lecture 11 Carsten Denker NJIT Physics Department Center for Solar–Terrestrial Research.
Using the “Clicker” If you have a clicker now, and did not do this last time, please enter your ID in your clicker. First, turn on your clicker by sliding.
Chapter 10 Rotational Motion
Physics 218: Mechanics Instructor: Dr. Tatiana Erukhimova Lecture 27.
Physics Simple – Pong Medium – Rigid bodies F = ma Circles, spheres, rectangles for collisions Complex – Fluids, clothings, explosions, hair.
CIS 487/587 Bruce R. Maxim UM-Dearborn
Classical Mechanics Review 4: Units 1-19
Dynamics of Moving Objects in Kinetic Sculpture (Ball Drop Physics II)
CBA #1 Review Graphing Motion 1-D Kinematics
Spring Topic Outline for Physics 1 Spring 2011.
Chapter 3 Forces.
Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Game Physics – Part I Dan Fleck Coming up: Rigid Body Dynamics.
Computer Assisted Laboratory Experiments in Mechanics Roman Kezerashvili New York City Technical College The City University of New York.
Newton’s 1 st Law of Mechanics A particle will continue is a straight line at constant speed unless acted upon by a net push or pull (i.e. force). The.
ROTATIONAL MOTION AND EQUILIBRIUM
Motion Summary.  Vectors & Scalars  Displacement, Velocity, Acceleration  Equations of motion  Relative motion.
THE LANGUAGE OF PHYSICS. ACCELERATION= a a= (v f -v i )/t v f - final velocity, v i - initial velocity UNITS ARE m/s 2 CONSTANT a NEGATIVE a POSITIVE.
1 Chapter 6: Motion in a Plane. 2 Position and Velocity in 2-D Displacement Velocity Average velocity Instantaneous velocity Instantaneous acceleration.
1 PPMF102– Lecture 3 Linear Momentum. 2 Linear momentum (p) Linear momentum = mass x velocity Linear momentum = mass x velocity p = mv p = mv SI unit:
Mechanics Topic 2.3 Work, Energy and Power. Work A simple definition of work is the force multiplied by the distance moved However this does not take.
Equation of Motion for a Particle Sect nd Law (time independent mass): F = (dp/dt) = [d(mv)/dt] = m(dv/dt) = ma = m(d 2 r/dt 2 ) = m r (1) A 2.
Chapter 8 Rotational Motion.
Kahoot. Question 1 A packing crate slides down an inclined ramp at constant velocity. Thus we can deduce that.
Equilibrium Forces and Unbalanced Forces. Topic Overview A force is a push or a pull applied to an object. A net Force (F net ) is the sum of all the.
FORCES Ch.10 “May the Force be with You”. I. Force All forces are exerted by one object on another object. All forces are exerted by one object on another.
IPC. Newton’s 1st Law of Motion Newton’s 1st Law of Motion – Objects in motion will stay in motion and objects at rest will stay at rest…unless a force.
July 16, UCSD - R.A. de Callafon Dynamics of Moving Objects in Kinetic Sculpture (Ball Drop Physics I) Raymond de Callafon Dynamic Systems.
The tendency of objects to resist change in their state of motion is called inertia  Inertia is measured quantitatively by the object's mass.  Objects.
Equilibrium Forces and Unbalanced Forces. Topic Overview A force is a push or a pull applied to an object. A net Force (F net ) is the sum of all the.
Hour Exam 2 Review 9:00 Exam is Tomorrow (Wednesday) at 7:00 pm.
02 Mechanics BY HEI MAN KWOK. 2.1 KINEMATICS Definitions Displacement: distance moved in a particular direction – vector; SL Unit: m; Symbol: s Velocity:
1 Work in Rotational Motion Find the work done by a force on the object as it rotates through an infinitesimal distance ds = r d  The radial component.
Chapter 14 Systems of Particles.
AP Physics C Montwood High School R. Casao. When a wheel moves along a straight track, the center of the wheel moves forward in pure translation. A point.
CS274 Spring 01 Lecture 7 Copyright © Mark Meyer Lecture VII Rigid Body Dynamics CS274: Computer Animation and Simulation.
Physical Science Forces
Physics Formulas. The Components of a Vector Can resolve vector into perpendicular components using a two-dimensional coordinate system:
A LOOK AT THE NATURE OF ENERGY Force and Motion. What is Force? A force is a push or pull. A force may give energy to an object, creating motion, stopping.
Rick Parent - CIS682 Rigid Body Dynamics simulate basic physics of an object subject to forces Keyframing can be tedious - especially to get ‘realism’
What is the deal with friction?. Friction Force that opposes the motion of objects that touch as they move past each other. 4 types of friction –Static.
Particle Kinematics Direction of velocity vector is parallel to path Magnitude of velocity vector is distance traveled / time Inertial frame – non accelerating,
Basic Rollercoaster Physics
Forces Chapter 3.
Physics 101: Lecture 13 Rotational Kinetic Energy and Inertia
Work and energy 1. Work Wf = |fk| |Δx| cos(180°) = -|fk| |Δx| < 0
EECE 478 Game Physics.
CHAPTER 4: Systems of Particles
Aim: How do we explain the rolling motion of rigid bodies?
Down the Slope Inclined Planes.
Momentum Chapter 1 Section 3.
Down the Slope Inclined Planes.
Forces Bingo.
Chapter 11 Angular Momentum
Gravitational Forces Physical Science.
Work, Energy, Power.
Chapter 3 Forces.
Energy and Momentum.
Presentation transcript:

1 Computer Game Physics The very basics

2 The Basics Force F Mass m Acceleration a: a = F/m Velocity v: v = a*t Position s: s = v*t …if F is constant

3 Conservation of Energy Kinetic Energy + Potential Energy = const. Ek = ½ m * v² Ep = m * g * h

4 How far and high will a ball fly, if it is kicked with a speed of 10m/s and an angle of 45 degrees ?

5 Game Physics Not trying to build a perfect physical model Most things can be approximated assuming Newtonian physics and rigid bodies Use discrete simulation (constant step) techniques Just worry about center of mass for most things

6 Position and Velocity Where is object at time t ? Equations x(t) = t * x_velocity + x_initial y(t) = t * y_velocity + y_initial Computation x = x + x_velocity y = y + y_velocity

7 Acceleration Computation x_velocity = x_velocity + x_acceleration y_velocity = y_velocity + y_acceleration Use piecewise linear approximation to continuous functions

8 Projectile Motion X = x + V x *t Y = y + V y * t V xi = cos(A) * V i V yi = sin(A) * V i V x = Vx - WR(V x - W)*t V y = V y – (WR(V y ) + G(y))*t W = windspeed (x only) A = inclination angle V i = initial velocity WR = wind resistance G(y) = gravity, depending on height (constant if height doesn’t change dramatically)

9 Friction Conversion of kinetic energy into heat Different types: –Static friction –Kinetic or sliding friction –Rolling friction

10 Friction Static friction For non moving objects only Can be seen as threshold of force needed to accelerate a mass

11 Friction Kinetic and rolling friction Depending on velocity Can be modeled as functions of velocity

12 Collisions Detect that collision has occurred (bounding box) Determine the time of the collision (may need to back up to point of collision) Determine where objects are when they touch Determine the collision normal (angle of incidence = angle of reflection) Determine the velocity vectors after the collision using the momentum

13 Momentum Momentum p = m * v The total momentum of a closed system is constant, as is the energy. This observation totally defines all collisions

14 Example: Collision of 2 spheres Assumption: Sphere 2 has zero velocity before collision Both spheres have same mass We get: Conservation of momentum: p1 = p1’ + p2’ Conservation of energy:m/2 v1²= m/2 v1’² + m/2 v2’² =>p1²= p1’² + p2’² These 2 equations together tell us that (because of the assumption of same mass !) the angle between v1’ and v2’ is 90deg. This makes life simple…

15 Collision of 2 spheres p1 p1’ p2’

16 Time-Based Modeling Time t is used in all kinematic equations that move objects (to avoid discontinuities caused by “slower” frame rates) This involves scaling dx and dy based on elapsed time (rather than a virtual clock) This allows constant movement regardless of processor slow downs