Dot & Cross / Perp dot product 2D Visualization

Download Typescript (Visual Studio 2015 project) source code (15kb)





Description

This tiny application demonstrates visually the results of the two-dimensional dot product and cross / perp dot product.
The products are calculated by two vectors that are given by the three red points. Vector v1 is defined as the vector that starts from point 1 and ends at point 2. Vector v2 is defined as the vector that starts from point 1 and ends at point 3.
Note that the red points can be moved by clicking and dragging them - the results of the products are instantly updated.


Notes about the Dot Product

The dot product of vectors v1 and v2 is defined as v1.x * v2.x + v1.y * v2.y .

For further information of the dot product, see also my article Derivation of the two-dimensional dot product.


Notes about the Cross / Perp dot Product

The cross product of vectors v1 and v2 is defined as v1.x * v2.y - v1.y * v2.x .
Actually the cross product is not defined for two-dimensional vector - here it is better known as the perp dot product.



Hope you liked it!

Sunshine2k, August 2k17



History

2017/08/25: Initial release.