Showing posts with label Vectors. Show all posts
Showing posts with label Vectors. Show all posts

Thursday, 12 April 2012

Multiplying two vectors

In mathematics there are a number of ways to multiply two vectors. The most common is the dot product, which works for any two vectors of the same size. In three dimensions there's the cross product, while in two dimensions there's the perp dot product, sort of equivalent to the cross product.

But they all have the weakness that they are not invertible. Given the cross product


and knowing c and another vector it isn't possible to calculate the third vector (c × c = 0, so given a solution all points on a line through this solution parallel to c are also solutions).

Wednesday, 22 February 2012

Collision theory

My last two posts have shown how to do basic collisions without explaining why they work. In many cases it's not important to know why, and a lot can be done with just bouncing balls off walls and the floor. But the theory shows where the results come from, how they fit together and most important how to use it to solve other collision problems.

Thursday, 2 February 2012

Perp dot product

I have used the perp dot product in a couple of posts but not explained it. It has a page at Mathworld but no Wikipedia article so I should perhaps explain it here.



The perp dot product is a product between two vectors in two-dimensions, and is obtained by taking the dot product of one vector with the perpendicular of the other. The perpendicular is simply a vector at right angles to the vector it is based on with the same magnitude. It is obtained by rotating through 90° or π/2 radians, or by multiplying by the complex number i in the complex plane.