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

Cross Product

The preceding section looked at one way to “multiply” vectors—the dot product. This section examines the cross product. The biggest difference between the two is that the dot product returns a scalar value and the cross product returns another vector. Let's look at the method for calculating the cross product.

NOTE

Some math texts refer to the cross product of two vectors as the vector product because that is what the cross product returns.

Cross Product

A × B = [(a2b3a3b2) (a3b1a1b3) (a1b2a2b1)]

for any two vectors A = [a1 a2 a3] and B = [b1 b2 b3].

Example 4.15: Cross Product

Find the cross product of vectors A = [5 –6 0] and B = [1 2 3].

Solution

The cross product returns another vector, so you can calculate each component ...

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