Vectors, Normals?

Blitz3D Forums/Blitz3D Beginners Area/Vectors, Normals?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

A vector is a line in space. It has a direction and a magnitude (its length.) A common example of a vector's usage is in keeping track of the velocity of a physical body:



Note that in the above diagram, the vector's components (x and y separately) are shown. The actual vector can be found by adding its components. You'd end up with a line pointing in the exact direction the cannonball is moving, with the length of the line showing its exact speed.



Vectors are used for normals as well as velocities. A normal describes the "angle" of a flat surface by pointing directly away from it. The normal of your desk is a line pointing straight up. The normal of the hood of your car points up and forwards a little (assuming that your hood is closed and we only have to deal with one side of it.) Typically, the magnitude (length) of a normal is 1, because its magnitude is not important. A vector with a magnitude of 1 is considered "normalized."