University of Wales Trinity Saint David
ACCB5017 - Games Architecture and Mechanics

Force and Translational Dynamics

Overview

This worksheet takes Newton's second law from the Forces worksheet and applies it to harder, more realistic situations. Forces now act at angles, several objects can be tied together, and some forces change as the object moves.

Every problem is solved with the same four-step method, so the method itself is the main thing to take away. The worksheet finishes with a C++ console program that collects several forces on a body every step and moves it forward in time, the pattern every physics engine uses.

Learning Objectives

By the end of this lab you will be able to:

Concept

Translational motion means the whole object moves without turning. For this kind of motion every object behaves as if all of its mass were concentrated at a single point, its centre of mass, and Newton's second law applies to that point. Rotation is a separate question with its own law, so this worksheet ignores it entirely.

Almost every dynamics problem can be solved with the same four steps. Draw a free body diagram. Choose a pair of perpendicular axes, usually with one along the direction the object moves. Split every force into components along those axes. Write Fnet=maF_{net} = ma once for each axis and solve. Choosing axes well is a skill in itself. On a slope it saves a lot of work to tilt the axes to match the slope, so that the acceleration lies along just one of them.

Some forces are not fixed. A spring pushes harder the further it is stretched. Air resistance grows as an object speeds up. Friction can take any value up to a limit while an object is still, then switches to a fixed value once it slides. Forces like these make the acceleration change over time, which is exactly why games step physics forward in small increments rather than solving it once at the start.

Tasks

Task 1 - The method, with angled forces

Hook

You pull a sledge across the snow with a rope held at an angle. Pulling at an angle wastes some of your effort lifting the sledge instead of moving it forward. How much of your pull actually moves it, and what happens to the force from the ground?

Intuition

An angled force does two jobs at once. Its horizontal component pulls the sledge forward. Its vertical component lifts it slightly, which means the ground no longer has to support the full weight, so the normal force drops. Splitting the force into components along your chosen axes separates the two jobs.

Axes are your choice. Rotate them below and notice that the components change but the gold net force arrow does not. Physics does not depend on how you draw your axes, only the amount of arithmetic does.

Formalise

The four-step method, written as equations for the two axes.

∑Fx=max∑Fy=may\sum F_x = m a_x \qquad \sum F_y = m a_y

Worked example

A 10 kg sledge is pulled by a rope at 30° above the horizontal with a tension of 50 N. The snow is frictionless. Find the acceleration and the normal force.

  1. Free body diagram. Weight 98.1 N98.1\text{ N} down, normal force NN up, tension 50 N at 30°.
  2. Axes. x horizontal, y vertical. The sledge only moves along x, so ay=0a_y = 0.
  3. Components. Tx=50cos⁡30∘=43.3 NT_x = 50\cos 30^\circ = 43.3\text{ N}, Ty=50sin⁡30∘=25 NT_y = 50\sin 30^\circ = 25\text{ N}.
  4. x equation. 43.3=10a43.3 = 10a, so a=4.33 m/s2a = 4.33\text{ m/s}^2.
  5. y equation. N+25−98.1=0N + 25 - 98.1 = 0, so N=73.1 NN = 73.1\text{ N}.

Your turn

A 15 kg lawnmower is pushed along its handle with 80 N, directed 40° below the horizontal. Ignore friction.

The horizontal component of the push is N and the vertical component is N downward, both to 3 significant figures.

The normal force on the lawnmower is N, to 3 significant figures, and its acceleration is m/s².

Why is the normal force on the lawnmower larger than its weight?

Pushing down along the handle presses the mower into the ground, so the ground pushes back harder.

What changes when you rotate your axes in a problem?

Components depend on the axes you choose. The physical net force and acceleration do not.

Task 2 - Inclined planes and friction

Hook

A box rests on a ramp. You slowly tilt the ramp steeper and steeper. For a while nothing happens, then suddenly the box starts to slide, and once it is moving it keeps accelerating even if you stop tilting. Why the sudden change?

Intuition

Tilt the axes to match the slope. Weight then splits into a part pulling down the slope, mgsin⁡θmg\sin\theta, and a part pressing into the slope, mgcos⁡θmg\cos\theta, which the normal force balances.

Static friction holds a still object in place by matching whatever force tries to move it, up to a maximum of μsN\mu_s N. When the down-slope pull exceeds that maximum, the box breaks free. Once sliding, kinetic friction takes over at a fixed μkN\mu_k N, which is usually smaller than the static maximum. That drop is why the box lurches into motion. Find the angle where the block below starts to slide, then press Release.

Formalise

With x along the slope pointing down it and y perpendicular to the slope.

N=mgcos⁡θma=mgsin⁡θ−μkmgcos⁡θfs≤μsNslides when tan⁡θ>μsN = mg\cos\theta \qquad ma = mg\sin\theta - \mu_k mg\cos\theta \qquad f_s \le \mu_s N \qquad \text{slides when } \tan\theta > \mu_s

Worked example

A block slides down a 30° slope with μk=0.2\mu_k = 0.2. Find its acceleration.

  1. Divide through by m. a=g(sin⁡θ−μkcos⁡θ)a = g(\sin\theta - \mu_k\cos\theta).
  2. Substitute. a=9.81(0.5−0.2×0.866)=9.81×0.327=3.21 m/s2a = 9.81(0.5 - 0.2 \times 0.866) = 9.81 \times 0.327 = 3.21\text{ m/s}^2.

The mass cancelled. A heavy block and a light block made of the same material slide down together.

Your turn

A block slides down a frictionless 25° slope. Its acceleration is m/s², to 3 significant figures.

On the same slope with μk = 0.3, the acceleration is m/s², to 3 significant figures.

A crate has μs = 0.5 with a ramp. It starts to slide when the ramp angle exceeds °, to 3 significant figures.

Does the mass of a block change the angle at which it starts to slide?

Both the down-slope pull and the friction limit are proportional to mass, so it cancels and the condition is tan⁡θ>μs\tan\theta > \mu_s.

A box sits still on a 10° slope with μs = 0.6. What is the friction force on it?

Static friction only supplies what is needed. Here that is just enough to cancel the down-slope pull, mg sin 10°, which is below the limit.

Why does a box often jerk into motion when a ramp is tilted past the critical angle?

The moment it slips, friction drops from the static maximum to the smaller kinetic value, so there is suddenly a sizeable net force.

Task 3 - Connected bodies

Hook

Two masses hang either side of a pulley on a light string, 3 kg on one side and 5 kg on the other. The heavier side falls and the lighter side rises. How fast do they accelerate, and how hard is the string pulling?

Intuition

There are two ways to look at connected objects, and using both is a good check. Treat the whole thing as one system, and the tension becomes an internal force that cancels out, leaving only the external forces to drive the total mass. Or treat each object separately with its own free body diagram, where the tension appears as an external force on each one. The system view gives the acceleration quickly. The separate view is needed to find the tension.

Formalise

For this setup, called an Atwood machine, with m2>m1m_2 > m_1.

a=(m2−m1)gm1+m2T=2m1m2gm1+m2a = \frac{(m_2 - m_1)g}{m_1 + m_2} \qquad T = \frac{2m_1 m_2 g}{m_1 + m_2}

Worked example

  1. System view. The unbalanced force is the difference in weights, (5−3)×9.81=19.62 N(5 - 3) \times 9.81 = 19.62\text{ N}, driving a total of 8 kg. a=19.62/8=2.45 m/s2a = 19.62 / 8 = 2.45\text{ m/s}^2.
  2. Separate view for the 3 kg mass. It accelerates upward, so T−3g=3aT - 3g = 3a, giving T=3(9.81+2.45)=36.8 NT = 3(9.81 + 2.45) = 36.8\text{ N}.
  3. Check with the 5 kg mass. It accelerates downward, so 5g−T=5a5g - T = 5a, giving T=5(9.81−2.45)=36.8 NT = 5(9.81 - 2.45) = 36.8\text{ N}. The two views agree.

The tension sits between the two weights, 29.4 N and 49.1 N. It is larger than the light mass's weight, so that mass speeds upward, and smaller than the heavy mass's weight, so that one speeds downward.

Your turn

A 4 kg block on a frictionless table is tied by a string over a pulley at the table's edge to a 2 kg mass hanging below.

The acceleration of the pair is m/s², to 3 significant figures.

The tension in the string is N, to 3 significant figures.

If the table had μk = 0.25, the friction on the block would be N and the acceleration m/s², both to 3 significant figures.

Explain why tension does not appear in the system view of connected bodies.

In the system view both ends of the string are inside the system. The string pulls one body forward and the other backward with equal and opposite forces, so the two tensions cancel when you add up all the forces on the system. Only external forces, such as weights and friction, are left.

Task 4 - Forces that change: springs and drag

Hook

Hang a mass on a spring and let go. It bounces up and down and, if there is any friction or air resistance at all, eventually settles at one position. Where does it settle, and why does it overshoot first?

Intuition

A spring's force grows the further it is stretched or squashed, always pointing back toward its natural length. This is Hooke's law. Released from its natural length, the mass accelerates downward because the spring is not yet pulling hard enough. When it reaches the position where the spring force equals its weight, the forces balance, but the mass is moving at full speed, so by the first law it carries on and overshoots.

Drag is a force that opposes velocity. At low speeds it is roughly proportional to the speed, a model called linear drag. Drag takes energy out of the motion, so the bounces get smaller. Explore the three types of damping below by changing b.

Formalise

Hooke's law, with xx the displacement from the natural length and kk the spring constant in N/m, and linear drag with coefficient bb in kg/s. A falling object with linear drag reaches terminal velocity when drag balances weight. At high speed, drag grows with the square of speed instead, where ρ\rho is the air density, CdC_d a shape factor and AA the frontal area.

Fs=−kxFd=−bvvt=mgbFd=−12ρCdAv2F_s = -kx \qquad F_d = -bv \qquad v_t = \frac{mg}{b} \qquad F_d = -\tfrac{1}{2}\rho C_d A v^2

Worked example

  1. Equilibrium of a hanging spring. A 0.5 kg mass on a spring with k=50 N/mk = 50\text{ N/m} settles where kx=mgkx = mg. x=0.5×9.81/50=0.098 mx = 0.5 \times 9.81 / 50 = 0.098\text{ m}, just under 10 cm. This is the gold line in the diagram.
  2. Terminal velocity. An 80 kg skydiver modelled with b=15 kg/sb = 15\text{ kg/s} reaches vt=80×9.81/15=52.3 m/sv_t = 80 \times 9.81 / 15 = 52.3\text{ m/s}.

Your turn

A spring is compressed. Which way does the spring force push on the object attached to it?

The minus sign in F = -kx means the force always opposes the displacement, pushing back toward natural length.

In the diagram with b = 0, what happens?

With no drag nothing removes energy, so the oscillation never dies away.

A large damping value makes the mass creep to equilibrium without overshooting. What is this called?

Overdamped motion returns slowly and never crosses equilibrium. The smallest damping that avoids overshoot is called critical damping.

A spring with k = 200 N/m is stretched by 0.05 m. Its force has a size of N.

A 0.1 kg ball with linear drag coefficient b = 0.02 kg/s has a terminal velocity of m/s.

Task 5 - Circular motion

Hook

A car drives round a bend at a steady speed. Its speed never changes, but its direction does. If the velocity is changing, Newton's second law says there must be a net force. What is it, and which way does it point?

Intuition

To keep turning, an object needs an acceleration toward the centre of the circle, called the centripetal acceleration. It does not speed the object up. It only swings its velocity round. The force causing it is not a new kind of force. It is always supplied by something real, such as friction between tyres and road, tension in a string, or gravity for an orbit.

If that force disappears, the object does not fly outward. By the first law it carries straight on along the tangent, the direction it was heading at that instant.

Formalise

ac=v2rFc=mv2rtoward the centrea_c = \frac{v^2}{r} \qquad F_c = \frac{mv^2}{r} \quad \text{toward the centre}

Worked example

A 1000 kg car takes a flat bend of radius 50 m at 15 m/s.

  1. Force needed. F=1000×152/50=4500 NF = 1000 \times 15^2 / 50 = 4500\text{ N}, supplied by sideways friction on the tyres.
  2. Top speed. With μs=0.7\mu_s = 0.7 the most friction available is 0.7×1000×9.81=6867 N0.7 \times 1000 \times 9.81 = 6867\text{ N}. Setting mv2/r=μsmgmv^2/r = \mu_s mg gives v=μsgr=0.7×9.81×50=18.5 m/sv = \sqrt{\mu_s g r} = \sqrt{0.7 \times 9.81 \times 50} = 18.5\text{ m/s}.

Above 18.5 m/s the tyres cannot supply enough sideways force and the car slides toward the outside of the bend, following a straighter path than the road.

Your turn

A ball is whirled on a string in a horizontal circle. What supplies the centripetal force?

The string pulls the ball toward the centre.

The string breaks. Which way does the ball go?

With no inward force, the first law keeps the ball moving in a straight line in the direction it had at that instant.

A car doubles its speed round the same bend. How much more friction does it need?

F=mv2/rF = mv^2/r, so doubling vv multiplies the force by four.

A 0.5 kg ball moves in a horizontal circle of radius 1.2 m at 4 m/s. The tension in the string is N, to 3 significant figures.

A passenger in a car turning sharply left feels pushed to the right. Explain what is really happening, without using the idea of a centrifugal force.

The passenger's body tends to keep moving in a straight line by Newton's first law. The car turns left underneath them, so the car door moves into their path and pushes them left, providing the centripetal force that makes them turn. They feel the door pressing on them and interpret it as being thrown right, but no outward force acts on them.

Task 6 - The force accumulator

A physics engine never solves a problem like the ones above with algebra. Instead each body keeps a force accumulator. Every step, each force source adds its force into the accumulator. Then the body divides the total by its mass, updates its velocity and position, and clears the accumulator ready for the next step. Gravity, springs, drag, thrusters and wind all use the same addForce call, so new forces can be added without changing the integration code.

Create a new Console App (C++) project named ForceAccumulator and replace its source file with the skeleton below, saved as ForceAccumulator.cpp. It models the 0.5 kg mass hanging on a 50 N/m spring from Task 4, with y pointing up and the spring's anchor at the origin.

  1. Complete addForce so it adds f into force.
  2. Complete integrate. Calculate the acceleration from the accumulated force and the mass, then update velocity and then position, scaled by dt.
  3. Complete clearForces so the accumulator returns to zero.
  4. In the loop in main, add the three forces before integrate is called. Gravity is (0, -m g). The spring force is -k times the body's displacement from anchor. Drag is -b times the body's velocity.

Success condition: the printed y values swing below and above about -0.098 m with shrinking swings, and by 10 s they have settled on the predicted equilibrium printed at the end. Then set b to 0.0 and confirm the swings no longer shrink.

ForceAccumulator.cpp
#include <cmath>
#include <iomanip>
#include <iostream>

struct Vec2
{
    double x;
    double y;
};

Vec2 operator+(Vec2 a, Vec2 b) { return { a.x + b.x, a.y + b.y }; }
Vec2 operator-(Vec2 a, Vec2 b) { return { a.x - b.x, a.y - b.y }; }
Vec2 operator*(Vec2 a, double s) { return { a.x * s, a.y * s }; }
Vec2& operator+=(Vec2& a, Vec2 b) { a.x += b.x; a.y += b.y; return a; }

struct Body
{
    double mass;
    Vec2 position;
    Vec2 velocity;
    Vec2 force;

    void addForce(Vec2 f)
    {
        // TODO: add f into the force accumulator
    }

    void integrate(double dt)
    {
        // TODO: acceleration is the accumulated force divided by mass
        // TODO: update velocity, then position, with semi-implicit Euler
    }

    void clearForces()
    {
        // TODO: reset the force accumulator to zero
    }
};

int main()
{
    const double g = 9.81;
    const double k = 50.0;     // spring stiffness in N/m
    const double b = 1.0;      // linear drag coefficient in kg/s
    const Vec2 anchor{ 0.0, 0.0 };
    const double dt = 0.001;

    Body body{ 0.5, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 } };

    std::cout << std::fixed << std::setprecision(4);
    std::cout << "t (s)    y (m)\n";

    for (int step = 0; step <= 10000; step++)
    {
        if (step % 500 == 0)
        {
            std::cout << step * dt << "   " << body.position.y << "\n";
        }

        // TODO: add gravity, (0, -m g)

        // TODO: add the spring force, -k times the displacement from the anchor

        // TODO: add linear drag, -b times the velocity

        body.integrate(dt);
        body.clearForces();
    }

    std::cout << "\nPredicted equilibrium y = " << -body.mass * g / k << " m\n";
    return 0;
}

What would go wrong if clearForces were never called?

Each step's forces would be added on top of every previous step's forces, so the accumulated force would keep growing. The body would behave as if gravity, the spring and drag were applied again and again, giving a huge and ever increasing acceleration instead of the correct one.

Solution

Try the tasks above before revealing the solution.