Ga'ash Soffer van Voodoo Extreme heeft weer een van zijn zwaar technische verhaaltjes online geknikkerd. Dit keer een les in 3D Engines voor de PC.
For most 3D computer applications, the Z axis goes from positive (+) into the monitor to negative (-) out of the monitor. The X axis goes from (-) left to (+) right. The Y axis goes from (-) down to (+) up. This is different than the "right hand rule" coordinate axis used by mathematicians.
Vectors in 3-space have magnitude and direction. Vectors are usually denoted by a bold face letter of the alphabet, i.e. a. A specific vector can be written as an ordered pair of n scalars, for n-space. In our case, 3. So, we could say the vector v = (1,2,3). The first column is units in the x direction, the second column is units in the y direction, the third column, units in z. Vectors are added by adding corresponding components, i.e. (1,2,3) + (2,3,4) = (3,5,7). Vectors can be scaled by multiplying by a scalar. This multiplication is done by multiplying each component of the vector by the scalar. For example, if v is (1,2,3), 2v is (2,4,6). The magnitude of a vector can be determined using a 3 dimensional analog to Pythagorean Theorem. Example, for the vector v = (1,2,3), ||v|| = magnitude of v = sqrt ( 1^2 + 2^2 + 3^2 ).