Visualizing Velocity and Derivative

Let's start by revisiting the concept of velocity. Remember that velocity is a vector, so it has direction, and in one dimension that direction is either positive or negative. I also said that average velocity is defined as displacement divided by time. To help visualize the motion of an object, you can start by graphing position versus time on a traditional Cartesian coordinate system. Let's step through the process with a vertical 1D situation like throwing something into the air.

Suppose your game character throws a tomato into the air. You can track the tomato's height as time increases, which gives you the values shown in Table 9.1.

Table 9.1. A Tomato's Height at Various Times
t (in sec)y (in ft)
06
190 ...

Get Beginning Math and Physics for Game Programmers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.