| Affine Space | An affine space consists of a point space and a linear vector space. The vector space is connected with the point space as follows: For each pair of points in the point space the difference between the two points is a vector in the vector space. For each vector in the vector space and for each point in the point space, adding the vector to the point results in a point in the point space. Every triple of points, p, q, r, satisfies (p-q) + (q-r) = p-r. |
| Reference Frame | A reference frame (frame for short) defines a new affine space in an existing one. A reference frame consist of a distinguished base point (the new origin) and a basis for the vector space, i.e., d linear independent vectors if d is the dimension of the affine space (which is the same as for the vector space). A reference frame defines a coordinate system for the points in an affine space. |
| Point | A point is an element of the point space of an affine space. In an affine space of dimension d a point pcan be represented using d Cartesian coordinates, , with respect to a reference frame. |
| Origin | The origin is a distinguished point in the current reference frame with all coordinates equal to zero. |
| Vector | A vector is an element of the vector space of an affine space. A vector is the difference vector between two points. In an affine space of dimension d a vector vcan be represented using d Cartesian coordinates, , with respect to a reference frame. |
| Hyperplane | A hyperplane h is defined using d+1 coefficient . A point p that lies in the hyperplane h satisfies the equation . Adding a zeroth coordinate to points that is constantly one, the equation homogenizes to the inner vector product . |
| Affine Combination | An affine combination of n points, , is defined as , where the sum of the coefficients equals 1, . |
| Affine Transformation |
An affine transformation is a linear mapping from an affine
space to an affine space that preserves affine combinations.
An affine transformation in a d-dimensional affine
space is fully specified by giving the image and pre-image of
d+1 points (i.e. a d-simplex). The mapping for
the points extends uniquely for the vector space since affine
transformations are linear mappings. This implies that
the affine transformation of the difference of two points
(a vector) is the same as the difference of two affine
transformed points. If the image space is not the same as the pre-image space, i.e., more than one reference frame is involved, it is necessary to keep track in which spaces the affine transformation operates. Let X be the space of the pre-image, Y the space of the image, the pre-image point in X, and the image point in Y. The affine transformation maps to , . Note, how the indices for the space line up nicely if we compose two affine transformation to go from space X to Y and to Z: . An affine transformation for fixed reference frames can be represented as a vector and a matrix. The vector is a translation vector and the matrix represents a linear transformation acting on the vector space. |
|
Change of Reference Frame |
Points have different coordinate representations in different
reference frames. Going from one reference frame to another
reference frame is a specific affine transformation (affine
combinations are preserved). Assuming the reference frame for
the new space is given in the reference frame of the points,
the affine transformation is easily specified as follows;
the base point of the reference frame maps to the origin
and each vector in the basis of the reference frame maps to
the unit vectors of the standard basis. We use the same index notation as for affine transformations to indicate the involved affine spaces. |
| Line | Defined by two distinct points through which the line passes. In dimension two hyperplanes are lines, see hyperplanes for an alternative representation in this case. In general, lines can also be represented as the intersection of d-1 hyperplanes. |
| Ray | Defined by a base point and a vector for the direction. |
| Segment | Defined by two distinct endpoints. |
| Triangle | Defined by three pairwise distinct endpoints. |
| ... |
Affine transformations do not preserve angles and distances. We need Euclidean geometry and rigid motions for that.
Points and vectors are not the same. Their coordinate representation
looks the same, but, for example, they do not transform the same way
under affine transformations. Furthermore, all vector operations are
defined for the vectors, but with the exception of affine combinations
none are allowed on points.
Points are vectors are related to each other. Vectors are difference
vectors between points and we can add a vector to a point to get a
translated point. The origin as distinguished point allows to convert
between points and vectors (the locus vector of the point in the
current reference frame). See the section Geometric Kernel in the Chapter about CGAL for a description of the solution in CGAL
that uses a symbolic origin to make this conversion efficient (see
also Origin.C for an example
point/vector/origin implementation).
Hyperplanes and covectors
The coefficient list of a hyperplane consists of a normal vector
(a vector orthogonal to the hyperplane) and
a scalar that specifies the distance
of the hyperplane from the origin. However, hyperplanes and normal
vectors do not transform like vectors under affine
transformations. (Normal vectors are also called covectors which
emphasizes there difference to regular vectors as defined above.)
Consider a hyperplane h and a point p in the hyperplane,
i.e., h p = 0 assuming the extended coordinate representation
for points. This linear equation must stay invariant under an affine
transformation A. We assume a matrix representation
for the affine transformation A. Denote the unknown
transformation matrix for the hyperplane with B.
In order to satisfy this equation we have to choose equal to . The correct application of an affine
transformation to a hyperplane is therefore:
Change of reference frames and affine transformations
Even though the change of a reference frame can be expressed as an
affine transformation they should be distinguished painstakingly.
Reference frames serve the purpose of representing the same geometric
configuration in different coordinate systems. On the other hand,
affine transformations move the geometric configuration
around. Without separating these two concepts, the following exercise
gets hard. Assume two affine spaces, X and Y, and an
affine transformation in space
X that is supposed to transform some points in space
Y. Express the affine transformation in the reference frame of
space Y.
Assume we have constructed the affine transformations M for the
reference frame of Y> to go from X to Y with
and to go from Y to X
with .
Now, the correct way of transforming a point p represented in
Y is to map the point first to X, transform it, and map
the result back to Y.
.
We can conclude that the correct affine transformation in space
Y is:
.
Note how the indices for the different affine spaces line up nicely in
the equations (a kind of type checking in mathematics).
Domain Analysis
Points versus vectors
COMP 290-001: Algorithm Library Design:
Lecture Notes
Lutz Kettner (
) 27.04.2000