Notation, Point & Vector Basics Introduction to Computer Graphics Arizona State University

Dianne Hansford

January 24, 2006

1 Notation

Let’s focus on 2D. After that, 3D is easy!

The [e_{1}, e_{2}]-coordinate system is defined by the origin o, and the e_{1} and e_{2} vectors:

o = [\begin{matrix}0 \\ 0 \end{matrix}] , e_{1} = [\begin{matrix}1 \\ 0 \end{matrix}] , e_{2} = [\begin{matrix}0 \\ 1 \end{matrix}] .

A point p describes a location and its coordinates are defined as

p = [\begin{matrix}p_{1} \\ p_{2} \end{matrix}] .

Therefore, a point’s location is defined by its coordinates in this coordinate system: p = o + p_{1}e_{1} + p_{2}e_{2}. Sometimes it is convenient to label the coordintes of p as p_{x} and p_{y}.

A vector v describes a displacement (direction and distance) and its components take the form

v = [\begin{matrix}v_{1} \\ v_{2} \end{matrix}] ,

and thus v = v_{1}e_{1} + v_{2}e_{2}. Figure 1 illustrates this basic geometry.

Figure 1: Point and vector notation.

2 Point and Vector Combinations

As illustrated in Figure 2, the sum of a point and a vector is a point:

q = p + v.  (1)

Vector addition may be described in terms of the parallelogram rule, as illustrated in Figure 3. Therefore, any scalar values s and t are acceptable in forming u = sv + tw.

To formulate point addition, let’s revisit (1) and the idea that a point plus a vector results in a point. As in Figure 4, we may form a point on the line through p and q as

r = p + tv  (2)
= p + t(q − p)  (3)
= (1 − t)p + tq,  (4)

therefore, the coefficients for point addition must sum to one. Such a requirement on the coefficients is called a barycentric combination. Another name for (4) is linear interpolation. Notice that when the parameter t = 0, r = p, when t = 1, r = q, and when t = 1/2, r is the midpoint between p and q.

Figure 2: The sum of a point and vector yields a point.

Thus we see that the relative positioning of p, q, r may be characterized by the parameter

t = \frac{||r − p||}{||p − q||},

using a signed distance, as illustrated in Figure 5. The relationship between the three points is also reflected in the quotient

ratio(p, q, r) = \frac{t}{1 − t} = \frac{||r − p||}{||q − r||},

and this ratio is also illustrated in Figure 5.

Point addition comes with some rules for two reasons.

1. We would like coordinate-system independent operations. For example, as illustrated in Figure 6, averaging two points should always yield the same point.

2. We want a method to construct a new point within the confines of the geometry defined by the given points. For example, as illustrated in Figure 4, we would like to construct a point on the line defined by p and q.

For more information, examples, and exercises, see Practical Linear Algebra – A Geometry Toolbox by G. Farin & D. Hansford, A K Peters, 2005.

Figure 3: The parallelogram rule encapsulates vector addition. Figure 4: The operation r = (1 − t)p + tq results in a point on the line defined by p and q.

Figure 5: Examples of the ratio of three points and the corresponding parameter t.

Figure 6: The result of the operation r = p + q is dependent on the coordinate system.