The Evil Head of Friction
This tutorial introduces the notion of friction. Basically speaking, friction is any force that retards or consumes energy from another system — like Facebook.
In all previous tutorials, all surfaces were assumed to be smooth, and that objects could slide as far as they wanted, without encountering any resistance to their motion. Yet, it is clear that no surface is perfectly smooth, as even the smoothest looking surfaces are rough and jagged when viewed at the atomic level.
People often associate friction as something that should be reduced and eliminated at best. For example, automobiles use roughly forty percent of the available energy to overcome friction from thermal conversion or mechanical frictions, which means that about twenty percent of the petrol tanked is used for nothing but to overcome internal frictions. Clearly, reducing that friction would be very desirable.
On the other hand, however, there would be no movement without friction. It is the friction between our feet and the Earth that allows us to move — just look at how hard it is when friction is but reduced when trying to walk on ice, for example.
Since friction is caused by random, microscopic irregularities and since it is affected by factors that cannot be controlled, it is impossible to state a simple law of nature that would govern all frictional forces. It is however possible to state a few rules of thumb that allow to compute approximations to model frictional forces well enough.
Let
Kinetic Friction
Kinetic friction comes into play whenever surfaces slide against each other. The force generated by this type of
friction will be denoted by
It is also important to note that the magnitude of kinetic friction does not depend on the relative speed of the surface, nor on the area of contact between surfaces. This second statement might be a bit counterintuitive, but it follows the same reasoning used when computing the centroid of a convex polygon: If the area of contact is considerable, the normal force is spread out over a large area, resulting in small forces per area, and thus the atomic imperfections are not pressed as deeply against each other. If the area of contact is small, the atomic imperfections in that area come into consideration with full force.
Static Friction
Static friction is the force that keeps two surfaces from moving relative to one another — once again due to atomic imperfections of the surfaces that are in contact. Static friction is often stronger than kinetic friction because when surfaces are in static contact, their imperfection, i.e. the microscopic hills and dents, had time to deeply nestle into each other.
There is an upper limit to the magnitude of static friction, denoted by
As for kinetic friction, the static friction does not depend on the area of contact.
The coefficient of static friction is, as was already mentioned, often greater than the coefficient of kinetic friction. The following table lists a few of the most common frictional coefficients:
Material | Kinetic Friction | Static Friction |
---|---|---|
Rubber on dry Concrete | 0,8 | 0,9 |
Steel on Steel | 0,57 | 0,74 |
Wood on Leather | 0,4 | 0,5 |
Rubber on Grass | 0,35 | 0,35 |
Rubber on wet Concrete | 0,25 | 0,3 |
Steel on Ice | 0,06 | 0,1 |
Glass on Glass | 0,4 | 0,94 |
Anti-Lock Breaking Systems
Imagine a car driving on the road with the tires rolling freely. Is the friction between the tires and the road kinetic or static?
The answer might be a bit surprising, the friction between the tires and the road is actually static. An easier way to understand that, is to watch your motion: Each time your foot is on the ground, it is actually static, as in, not moving relative to the ground. The same is true for the tires of a car: as long as the tires are rolling, the friction is static: if the car skips, however, the friction is kinetic. It follows that a car can be stopped in less distance over time if its wheels are rolling than if its wheels are locked up, which is the idea behind the anti-lock breaking system (ABS). When the brakes are applied on a car with ABS, an electronic sensor detects whether a wheel is about to start skidding, and if so, a small computer quickly modulates the hydraulic pressure in the brake lines in short bursts, causing the brakes to release and then reapply in rapid succession. This way, the tire can continue rolling, and thus static friction still determines the stopping distance over time.
Implementation
As seen in the previous tutorial, all forces can be represented in the same way
Demo: Kicker
As an example, I created a small kicker or air hockey demo. Pressing the space button fires a ball on a virtual kicker table in a random direction. Using the arrow keys, the direction of movement and the initial velocity of the ball can be changed. The keys Q and A can be used to increase or decrease the coefficient of kinetic friction.
The position of the ball is updated using semi-implicit Euler, as follows:
Once the symplectic integrator returns the new position and velocity of the ball, the new acceleration is set to point in the opposite direction of the movement using the std::copysignf function.
Note that to simulate collisions with the rectangular table, it is sufficient to remember that the angle of reflection equals the angle of incidence. Read the tutorial about basic collision response for more details on this subject.
You can download the source code from here.
Friction on an Inclined Plane
To see how friction works on an inclined plane, it is useful to first analyse the situation of a mass
To see what happens, we break down the forces into their
For the
For the
From this second equation, we can deduce the value of the normal force:
Now what happens when the mass actually starts to slide? As we have seen, the movement is governed by the following
equation:
To use this in a game, remember that
References
- Differential Equations, by Prof. Dr. K.-F. Siburg
- Dynamical Systems, by Prof. Dr. K.-F. Siburg
- Geogebra
- Physics, by James S. Walker
- Tricks of the Windows Programming Gurus, by A. LaMothe
- Wikipedia