*** Welcome to piglix ***

Direction vector


In mathematics, a direction vector that describes a line D is any vector

where and are two distinct points on the line. If v is a direction vector for D, so is kv for any nonzero scalar k; and these are in fact all of the direction vectors for the line D. Under some definitions, the direction vector is required to be a unit vector, in which case each line has exactly two direction vectors, which are negatives of each other (equal in magnitude, opposite in direction).

In Euclidean space (any number of dimensions), given a point p0 and a (nonzero) direction vector d, a line is defined parametrically as the set of points p where p = p0+ td, and where the parameter t varies between -∞ and +∞. This line formalism demonstrates use of direction vector d to specify the run direction of the line.

The line equation p0+td is a generative form, but not a predicate form. Points may be generated along the line given values for p0, t and d:

pp0 +td

However, in order to function as a predicate, the representation must be sufficient to easily determine ( T / F ) whether any specified point p is on the given line [ p0, d ]:


...
Wikipedia

...