Kinematic Phsics for Simulation and Game Programming Mike Baile mjb@cs.oregonstate.edu phsics-kinematic.ppt mjb October, 05 SI Phsics Units (International Sstem of Units) Quantit Units Linear position Meters Linear velocit Meters/second Linear acceleration Meters/second Force Newtons Energ Joules Power Watts Mass Kilograms Weight Newtons Densit Kilograms/meter 3 Time Seconds Pressure Newtons/meter Momentum Kilograms-meters/second Angular position Radians Angular velocit Radians/second Angular acceleration Radians/second Moment (=torque) Newton-meters Moment of Inertia Kilogram-meters 3 Temperature º Celsius mjb October, 05
SI Phsics Units (International Sstem of Units) Metrification of the World: http://en.wikipedia.org/wiki/international_sstem_of_units US Metric Association mjb October, 05 Some Useful Conversions meter = 39.37 inches = 3.8 feet mile =,60 meters =.60 kilometers mile per hour =.467 feet per second mile per hour = 0.447 meters per second gallon = 3.79 liters cubic foot = 7.48 gallons = 8.35 liters kilogram =. pounds (mass, at Earth s surface) Newton = 0.4 pounds (force) pound = 4.45 Newtons (force) radian = 57.3º mjb October, 05
What s the Difference Between Mass and Weight? Mass is the resistance to acceleration and deceleration. You can also think of it as inertia -- how difficult it is to accelerate a wagon with something in it. Weight is the force pulling ou towards the center of whatever planetar bod ou happen to be standing on. On the moon, our mass would be the same as it is on Earth. It would still require the same amount of force to push ou in a (frictionless) wagon. On the moon, however, our weight would be about / 6 of what it is on Earth. Because most of us are stuck on Earth, within a mile or two of sea level, in common practice, mass and weight designate about the same thing. mjb October, 05 Some Useful Conversions A gram is about the mass of a paper clip A nickel has a mass of about 5 grams A liter is half of a -liter soda bottle, or about a fourth of a gallon of milk A kilogram is a little more than twice as much as a pound (on Earth) A Newton is about ¼ of a pound A meter is a little more than a ard A kilometer is about 5 / 8 of a mile Water freezes at 0º Celsius A comfortable da is around 4º Celsius A reall hot da is around 35º Celsius Your bod temperature is about 37º Celsius mjb October, 05 3
Some Different Useful Conversions http://kcd.com mjb October, 05 Newton s Three Laws of Motion. Ever object in motion keeps that same motion (i.e., same speed and direction) unless an eternal force acts on it.. Force equals mass times acceleration (F=ma) 3. For ever action, there is an equal and opposite reaction. F ma 3 mjb October, 05 4
Acceleration Due to Gravit Newton s Gravitational Law sas that the attraction force between two objects is the product of their masses times the gravitational constant G, divided b the square of the distance between them: F Gm m d where: G 6.670 Nm kg and d is the distance between bod and bod Earthradius For an object, m, at or near the surface of the Earth (i.e., d is the radius of the Earth) this simplifies to: meters feet F mg where: g 9.8 3. sec sec g is known as the Acceleration Due to (Earth s) Gravit mjb October, 05 v v0 at d d0 v0t at Constant-Acceleration Formulas (these are worth memorizing!) d d0 v0t If ou are moving verticall, then the acceleration, a, will be the acceleration due to gravit, g: +Y g = -9.8 meters/sec = -3. feet/sec -Y If ou are moving horizontall, there is no acceleration unless some outside horizontal force creates it. d d v t 0 0 The following formula is hand because it relates all the usual quantities, but doesn t require ou to know the elapsed time: v v0 a( dd0) mjb October, 05 5
V Vcos,Vsin Projectile Motion d cliff h cliff Initial Quantities: a X: Y: 0 a g v0 V cos v0 V sin X: Quantities in Flight: d d v t 0 0 Y: h h0 v0t mjb October, 05 V A Projectile Launches Where Does it End Up? V cos,v sin 0 0 0 3 h cliff d cliff Strateg: Treat each case separatel. Figure out what limitation makes the projectile stop moving, calculate the time to get to that, and then see where the projectile would have ended up. mjb October, 05 6
Case. What if it Never Reaches the Cliff? V Y Distance Equation: t( v 0) 0 0. 0. v0t Solve for the time: v t 0 0 v * 0 t 0, g Note: g < 0. How Far will it Go? Solve for the X Distance: d d v t 0 0 * mjb October, 05 Case. What if it Hits the Side of the Cliff? V X Distance Equation: d cliff 0. v t 0 d v t cliff 0 d cliff Solve for the time: d * t v cliff 0 How High will it Go? Solve for the Y Distance: h 0. v0t mjb October, 05 7
Case 3. What if it Lands on Top of the Cliff? V h impact 3 Y Distance Equation: himpact 0. v0t 0 v0t himpact Solve for the time: Note: g < 0. At Bt C 0 t A B B 4AC Note: this will also work if h impact < 0. Note: if h impact == 0., this becomes Case # v * 0 v0 ghimpact t How Far will it Go? Solve for the X Distance: g d d v t 0 0 * mjb October, 05 How do ou decide if Case,, or 3 is the Correct Solution? 3 h cliff d cliff Consider Case #: If the horizontal distance that it travels is d cliff, then this is what happened. Consider Case #: If the height of the projectile is h cliff as its horizontal distance passes d cliff, then this is what happened. Otherwise, Case #3 is what happened. mjb October, 05 8
Case 3 Projectile Motion: How Long will the Projectile Sta in Flight? V d impact t v * 0 v0 g( d0 dimpact) g Wh are there solutions for t*? How do ou know which one is the correct one? mjb October, 05 Case,, 3 Projectile Motion: When and Where will the Projectile Reach its Maimum Height? V The velocit at the maimum height is zero h impact Y Velocit Equation: v v 0 0 Solve for the time: v V t g g * 0 sin Note: g < 0. How High will it Go? Solve for the Y Distance: * * * h 0. v 0t g t mjb October, 05 9
Let s Tr it with Some Numbers Find how much time it takes for the projectile to hit the ground. Find how far the projectile travels horizontall before hitting the ground. Find the maimum height the projectile reaches before starting back down. V=(0.,0.) meters/sec Simplif g to be -0 meters/sec. Deal with just the Y component first. What is the equation that relates distance travelled to initial velocit and gravitational acceleration? dimpact d0 v0t. Solve for t when d impact =d 0. Wh are there answers? What are the? Which one do ou want? d0 d0 0t 0t mjb October, 05 3. Now deal with the X component. What equation relates distance traveled to initial velocit and (zero) acceleration? d d v t 0 0 4. Plug in the t ou got in step #. How far did the projectile travel? d 00t 5. Now deal with the maimum height. What is the Y velocit when the projectile reaches the maimum height? 0.0 6. What equation relates velocit achieved to initial velocit and distance travelled? (Hint: there is one that doesn t need t.) v v a( d d ) 0 0 7. Solve it for (d -d 0 ). 0 0 0( d d ) 0 mjb October, 05 0
The Phsics of Bouncing Against a Floor or Wall To treat the case of an object bouncing against an immoveable object, such as a floor or a solid wall, the resulting velocit is: v ev Balls Bounced on a Concrete Surface: Ball Material CoR range golf ball 0.858 tennis ball 0.7 Where e is the Coefficient of Restitution (CoR), and is a measure of how much energ is retained during the bounce. billiard ball 0.804 hand ball 0.75 wooden ball 0.603 The amount of energ actuall retained during the collision is: Eretained e Which means that: Elost e steel ball bearing 0.597 glass marble 0.658 ball of rubber bands 0.88 hollow, hard plastic ball 0.688 http://hpertetbook.com/facts/006/restitution.shtml mjb October, 05 A Ball Bouncing in a Bo Current Position = (,) Current Velocit = (v,v ) How long until the net bounce? v t radius left v t radius right vt floor radius v * v g floor radius t g. Figure out which equation produces the minimum positive t value. Advance the ball that much v ev 3. Perform the bounce in the proper direction 4. Handle the rest of the time step v v v v v ev or: If no bounce: vt vt v v v v mjb October, 05
The Phsics of Bouncing Against a Floor or Wall void Bounce( float dt ) { while( dt > EPSILON ) { float tmin = dt; int which = NOTHING_HIT; // minimum time to do something // which reason was it for doing the something: float tleft =????; // time to hit the left wall if( tleft > 0. && tleft < tmin ) { tmin = tleft; which = HIT_LEFT; } vt left radius left radius tleft v float tright =????; // time to hit the right wall... float tfloor =????; // time to hit the floor... float tfloor =????; // time to hit the floor (note there are answers)... // tmin is now set to the smallest of:dt, tleft, tright, tfloor, tfloor which are all positive // which is set to: // NOTHING_HIT, HIT_LEFT, HIT_RIGHT, HIT_FLOOR, or HIT_FLOOR // to show what was the first thing hit mjb October, 05 The Phsics of Bouncing Against a Floor or Wall // take a time step of time lenh tmin, using the projectile motion equations: // if a bounce is going to occur, tmin takes the ball right up to the surface: Xnow =????; Ynow =????; Vnow =????; Vnow =????; // change the proper velocit component: // if nothing was hit in this time step, just return: vt vt v v v switch( which ) { case NOTHING_HIT: return; case HIT_LEFT:?????; break; case HIT_RIGHT:????? break; case HIT_FLOOR:????? break; case HIT_FLOOR:????? break; } tmin v ev v v v v v ev dt or: } dt -= tmin; } // after the bounce, we might still have some time step left mjb October, 05
So far, we have onl been dealing with objects undergoing linear motion What about objects undergoing rotational motion?. Spinning motion. Motion around a curve mjb October, 05 Spinning Motion: Constant-Acceleration Formulas 0 t 0 0t t Angular acceleration (radians/sec ) Angular velocities (radians/sec) ( ) 0 0 Note: In the same wa that the linear equations can work in,, and z, the rotational equations can work for rotations about the,, and z aes mjb October, 05 3
Motion around a curve: Centripetal / Centrifugal Force. Ever object in motion keeps that same motion (i.e., same speed and direction) unless an eternal force acts on it.. Force equals mass times acceleration (F=ma) 3. For ever action, there is an equal and opposite reaction. That force is called Centripetal Force, and acts on all objects as the round curves in order to make them round the curve and not go fling off For the car, that force is the friction of the road on the tires. For ou, that force is the side of the car on ou. mjb October, 05 Then What is Centrifugal Force? The Centripetal Force is making the block change directions. This is what we observe from the outside. But, if we were observing while riding on the block, the motion direction that our mass wants to keep is the original straight line. But, the block has been forced to change to a new direction. Until our mass also changes to this new direction, we are going to keep tring to go in the old direction, which seems to us to be towards the outside of the curve. We think we are being thrown there, but it is just a natural consequence of Newton s First Law. mjb October, 05 4
Then What is Centrifugal Force? http://kcd.com mjb October, 05 How Much Force is the Centripetal Force and Where Does it Point? r v a r r s,v ( meters, meters/sec ), s v ( radians, radians/sec ) r r v F ma m m r r This force points towards the instantaneous center of curvature mjb October, 05 5
Torque Torque is like the rotational-motion equivalent of force. It is defined as a force, F, acting at a distance, d. (That distance is sometimes called a moment-arm.) F Pivot Point d Torque = F d An object is in static equilibrium if :. Sum of the forces = 0. Sum of the torques = 0 mjb October, 05 Torque-Balance lets us Analze Common Mishaps A truck rounding a bend too quickl Center of Gravit w h Centrifugal Force = v m R Gravit Force (Weight) = mg Pivot Point The truck will tip if Tipping Torque > Gravit Torque: v w m h mg R What are the impacts of m, v, R, h, and w? mjb October, 05 6