Notation, Point & Vector Basics
Introduction to Computer Graphics
Arizona State University
Dianne Hansford
August 22, 2007
1 Notation
Lets focus on 2D. After that, 3D is easy!
The [e1 , e2 ]-coordinate system is defined by the origin o, and the e1 and e2
vectors:
0 1 0
o= , e1 = , e2 = .
0 0 1
A point p describes a location and its coordinates are defined as
p
p= 1 .
p2
Therefore, a points location is defined by its coordinates in this coordinate
system: p = o + p1 e1 + p2 e2 . Sometimes it is convenient to label the
coordintes of p as px and py .
A vector v describes a displacement (direction and distance) and its com-
ponents take the form
v
v= 1 ,
v2
and thus v = v1 e1 + v2 e2 . Figure 1 illustrates this basic geometry.
1
p
e2
0 e1
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, lets 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 re-
quirement 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.
2
r
v
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
||r p||
t= ,
||q p||
using a signed distance, as illustrated in Figure 5. The relationship between
the three points is also reflected in the quotient
t ||r p||
ratio(p, r, q) = = ,
1t ||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 exam-
ple, 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 Al-
gebra A Geometry Toolbox by G. Farin & D. Hansford, A K
Peters, 2005.
3
w w-v v+w
v-w
v
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.
4
1:3
t=1/4 t=3/2
3:1
t=3/4 t= -1/10
t : 1-t
t=1/2
p r q
Figure 5: Examples of the ratio of three points and the corresponding pa-
rameter t.
r? r?
p
Figure 6: The result of the operation r = p + q is dependent on the coordi-
nate system.