Vectors Tools for Graphics. Vector, Geometry and CG. To review vector arithmetic, and to relate vectors to objects of interest in graphics. To relate geometric concepts to their algebraic representations. To describe lines and planes parametrically. To distinguish points and vectors properly.
The difference between two points is a vector: v = Q - P;
Q = P + v.
Note that if w is the vector from point A to point B, then |w| will be the distance from A to B
It is often useful to scale a vector so that the result has a length equal to one. This is called normalizing a vector, and the result is known as a unit vector. For example, we form the normalized version of a, denoted , by scaling it with the value 1/|a|:
Ex. a = (3, -4),
the distance from a point C to the line through A
in the direction v is:
The cross product (also called the vector product) of two vectors is another vector. It has many useful properties, but the one we use most often is that it is perpendicular to both of the given vectors. The cross product is defined only for three-dimensional vectors.