O'Reilly logo

Beginning Math and Physics for Game Programmers by Wendy Stahler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required