Presentation on theme: "Physics: Laws of Motion Soon Tee Teoh CS 134. Newtons Laws of Motion First Law: When there is no net force on an object, its velocity would remain the."— Presentation transcript:
Physics: Laws of Motion Soon Tee Teoh CS 134
Newtons Laws of Motion First Law: When there is no net force on an object, its velocity would remain the same. –If its at rest, it remains still. –If its moving in a certain direction at a certain speed, it will continue moving in that direction at that speed. Second Law: Force = mass x acceleration –When a net force is applied to an object, it causes the object to change its velocity. Third Law: For every action, there is an equal and opposite reaction. –We saw that in collision response.
Driving Games Well use driving games as an example of the use of physics in games. Newtons First Law at work: If the car is not moving, and the players not stepping on the gas pedal, the car remains at rest. Newtons Second Law at work: If the player steps on the gas, the car begins to accelerate (velocity increases).
Determining Net Force Different forces act on the car –Gravity: If the car is on a slope –Engine: The engine powers the car and turn the wheels –Air resistance: Air resistance applies a force on the car, especially as the car is moving faster –Friction: Friction of the wheels with the road surface We have to calculate all these forces and then determine the acceleration (change in velocity) the net force creates in the car. Determine net force by vector addition. –Suppose F1 and F2 are acting on an object. Then, the net force acting on the object Fnet = F1 + F2. F1 F2 Fnet = F1 + F2
First Approximation Consider a car moving forward on a flat surface. Assume that the force applied on the car is proportional to how hard the player steps on the pedal. Then, according to F=ma, the car will travel at constant acceleration, proportional to how hard the player steps on the pedal. At each game loop, increase velocity by a constant amount (assuming each game loop takes a constant amount of time).
Updating Car Status Suppose weve figured out what the net force is on the car. Then, we can derive what the acceleration is on the car using the equation F = ma. Knowing the acceleration, we need to update the status of the car for this game loop. Assume that a game loop takes t units of time. Suppose that at the beginning of the game loop, the car has velocity v1. –Then, the new velocity of the car after the game loop is v new = v1 + a * t –And, the distance traveled by the car during this game loop is: d traveled = v1 * t + (a * t 2 )/2 –With this, update the new position and velocity of the car.
Resistance Cars face resistance as they move. Resistance R total = R air + R rolling R air = (1/2)rV 2 S p C d R rolling = C r w where r = mass density of air V = speed of the car S p = projected frontal area normal to direction of V C d = drag coefficient (0.3 for sports cars, 0.4 for cars, 0.5 for trucks) where C r = coefficient of rolling resistance (=0.01) w = weight of the car
Applying Brakes Stopping distance is a function of how hard you step on the brakes and how effective the brakes are, as long as the car is not skidding. However, if skidding, then d s = V 2 /(2g(m cos q + sin q)) where d s = skidding distance m = coefficient of friction q = inclination (uphill is positive)
Slope What if a car is going up or down a slope? Then, gravity exerts a force on the car which will affect its motion. The force on the car F = mg, where m is the mass of the car, and g is the gravitational acceleration ( = 9.81m/s 2 ) q mg
Slope (continued) Now, we need to split up the gravitational force into two component forces. One is parallel to the road surface and the other is perpendicular to the road surface. The perpendicular force (mg cos q) is balanced by the normal force from the road surface. The parallel force (mg sin q) needs to be added to the net force acting on the car. This net force influences the acceleration of the car (as explained in earlier slides). q mg mg cos q mg sin q
Turning Suppose that a car is turning at constant speed. Though the speed is constant, the direction is different, hence the velocity is different (since velocity refers to speed in a particular direction). There is a change in velocity, hence there is acceleration. The acceleration of an object traveling in a circle is given by the following formula: a = (4 * p 2 * R) / T 2 –Where R is the radius of the circle, p is 3.14159…, and T is the time needed for the object to complete the circle The Force needed to cause this acceleration is F = ma. The player will need to step on the gas to give it that force, otherwise, the deficit in force will cause the car to slow down.
Maximum Turning Speed on Flat Surfaces To turn a car, the driver turns the front wheels in the direction. What causes the car to turn is the friction between the wheels and the road surface. There is a maximum speed that the car can turn at. The centripetal force on the car is mv 2 /r. This is the force that causes the car to turn. The maximum frictional force is mmg, where m is the coefficient of static friction. Equating the two: mv 2 /r = mmg Re-arranging, v = sqrt(rmg), which gives the maximum turning speed of the car.
Maximum Turning Speed on Banked Surface If the car is traveling on a banked surface, a component of gravity supplies part of the centripetal force. Then, the maximum turning speed becomes: v = sqrt((rg(sin q – m cos q))/(cos q + m sin q)) q