The fundamental 3-dimensional space objects that form the basis for all operations in computer graphics are the point and the vector (sometimes called a free vector). These objects are often confused when studying the field and frequently students are taught that points and vectors are ``essentially'' the same. However, they are very different. Namely,
For a pdf version of these notes look here.
Geometrically, we draw points as dots and vectors as line segments with arrows. We will generally draw vectors by attaching them to a specific point, but it should be emphasized that any vector is positionless. We will denote points by capitalized bold letters such as and , and will denote vectors as lower case letters with an arrow above such as and .
In computer graphics we utilize an affine space. This space is made up of a set of points and a vector space . The points and vectors of this space are related in a fixed, but simple manner by the following axioms. We illustrate the axioms by utilizing the affine space of 2-dimensional points and vectors. In this example we represent points componentwise by utilizing parenthesis (e.g. ) and vectors by utilizing brackets (e.g. ).
Several axioms exist that relate the points and vectors in an affine space. In general, the points are thought to play the primary role in the space, while the vectors are utilized to move about in the space from point to point. The general axioms are as follows.
The point is frequently written as , and the vector is frequently written as .
From the three axioms, we can deduce that affine spaces have the following properties.
This is an immediate property of the head-to-tail axiom with .
We note that both the left- and right-hand sides of this equation are vectors. This therefore states that the additive inverse of the vector is .
We note that both the left- and right-hand sides of this equation are vectors. This axiom is illustrated in the affine space of two-dimensional points and vectors in the following figure.
We note that both the left- and right-hand sides of this equation are vectors. The axiom is illustrated for the affine space of two-dimensional points and vectors in the following figure.
It should also be noted in this case that the vectors are free and positionless. The two resulting vectors have the same direction and magnitude, and therefore are equal.
We note that both the left- and right-hand side of this equation are points. This is just a direct result of the definition of the vector .
We note that the left- and right-hand side of this equation are vectors. This axiom is illustrated for the affine space of two-dimensional points and vectors in the following figure.
We note that these axioms show that points and vectors are two different entities. In particular, vectors can be added, but points cannot. Vectors can also be scaled, while points cannot. Many people look at points as playing the primary role in the geometry, while the role of vectors is to allow movement from point to point.
There are operations on points which are fundamental to the nature of the computer graphics field. These operations are the affine combinations which arise from the following operation:
Let and be points in our affine space. Consider the expression
We note that if then is somewhere on the line segment joining and .
This expression allows us to define a basic operation on points. We utilize the following notation
We can generalize this to define an affine combination of an arbitrary number of points. If are points and are scalars such that , then
To construct an excellent example of an affine combination consider three points , and . A point defined by
In fact, it can be easily shown that if then the point will be within (or on the boundary) of the triangle. If any is less than zero or greater than one, then the point will lie outside the triangle. If any is zero, then the point will lie on the boundary of the triangle.