Maths Revision – Dot / Cross Product

As part of the NextGen course we are educated and tested on a variety of maths, a subject I have not studied since leaving school. Recently we learned about Dot and Cross Products, what they are, how to calculate them and how they can be put into practice.

Dot Product

The Dot Product can also be known as the Scalar Product. It performs a series of multiplications with 2 vectors to give a single, scalar value with various uses including back face culling within 3D rendering software.

blog3

Back-Face Cull

If the dot product is less than zero, the polygon is recognised to be facing the camera and is visible. Therefore, If the value is greater than zero, it is facing away from the camera and is invisible to the viewer.

The dot product gives the cosine of the angle between 2 vectors, times by the length of each vector. Therefore, the cosine can be calculated by dividing by the length of each vector.

How is the Dot Product calculated?

The dot product is calculated by multiplying the corresponding values from 2 vectors and finding the sum of these results. For example:

blog1

Dot Product References

Below shows a number of links and videos which further explain dot products and their uses.

http://betterexplained.com/articles/vector-calculus-understanding-the-dot-product/

Cross Product

Cross Product is also known as the Vector Product and performs a series of multiplications to two vectors resulting in a new vector perpendicular (90 degrees) to the original vectors.

The length of the perpendicular vector is equal to that of the area of the square, rectangle or parallelogram created by the original two vectors.  This can also be described as the product of the length of the original vectors and the sine of the angle between them.

How is the Cross Product calculated?

The cross product can be calculated as shown below.  The example shows the calculation to find the cross product between vectors {1, 2, 3} and {3, 2, 1}.

blog4

I found the above layout very difficult to understand at first, until I was shown the following method / diagram.

blog5.png

This method requires you to write out each vector twice, one above the other, linking them with “crosses” in between.  You then multiply then corresponding numbers and subtract them away from each other, resulting in the perpendicular vector.

Cross Product References

As discussed with dot products, below shows a number of links and videos which further explain cross products and their uses.

http://betterexplained.com/articles/cross-product/

https://www.youtube.com/watch?v=NZGIX6dylNk&feature=youtu.be

 

Advertisements

One thought on “Maths Revision – Dot / Cross Product

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s