Game Development Reference

In-Depth Information

Figure 4-1. Free-body diagram of ship

Notice here that the buoyancy force is exactly equal in magnitude to the ship's weight

and opposite in direction; thus, these forces cancel each other out and there will be no

motion in the y-direction. This must be the case if the ship is to stay afloat. This obser‐

vation effectively reduces the problem to a one-dimensional problem with motion in

the x-direction, only where the forces acting in the x-direction are the propeller thrust

and resistance.

Now you can write the equation (for motion in the x-direction) using Newton's second

law, as follows:

ΣF = m a

T - R = m a

T - (C v) = m a

Where
a
is the acceleration in the x-direction, and
v
is the speed in the x-direction.

The next step is to integrate this equation of motion in order to derive a formula for the

speed of the ship as a function of time. To do this, you must make the substitution
a
=

dv
/
dt
, rearrange, integrate, and then solve for speed as follows:

T - (C v) = m (dv/dt)

dt = (m / (T-Cv)) dv

∫
(0 to t)
dt = ∫
(v1 to v2)
(m / (T-Cv)) dv

t - 0 = -(m/C) ln(T-Cv) |
(v1 to v2)

t = -(m/C) ln(T-Cv
2
) + (m/C) ln(T-Cv
1
)

t = (m/C) [ln(T-Cv
1
) - ln(T-Cv
2
)]

(C/m) t = ln [(T-Cv
1
) / (T-Cv
2
)]

e
(C/m) t
= e
ln [(T-Cv1) / (T-Cv2)]

e
(C/m) t
= (T-Cv
1
) / (T-Cv
2
)

(T-Cv
2
) = (T-Cv
1
) e
-(C/m)t