I'm trying to make a first person asteroid shooter game and I'm running into some difficulties with the math. I discovered that in order to turn a ship relative to itself, I need to be able to revolve a vector around another vector. This is above my current math skills so I just went to this website:
Note that I haven't troughly gone through the link in your post but the idea is pretty basic here.
Pretty much you have a matrix that will describe your position.
For example, matrix below represents a set of points (A, B) that form a line with slope 1. Now if I wanted to reflect this matrix about the Y-axis, I would want to multiply it by a value (a matrix) such that a point is now [-1, 1]:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
What I'm giving:
A B
X [1 0]
Y [1 0]
What I'm multiplying by:
A B
X [1 0] [-1 0]
Y [1 0] [0 1]
Reflected (what I want):
A B
X [1 0] [-1 0] = [-1 0]
Y [1 0] [0 1] = [1 0]
I just simple points put inside a matrix to illustrate the basic point but you can do this with vectors as well. The notion I've shown is very common.
No idea. Did you try it for a few known vectors? I like how the author explained matrix multiplication but didn't explain how to actually derive the matrix.
You may want to look into quaternions. Check out the following link and pay special attention to the "Rotating vectors" section: