A concept used in the implementation of bump mapping.

When bump mapping a surface, you have to apply the illumination equation at every pixel. This is very expensive, in part because it means that you have to transform the normal into world coordinates, the same as the light source. One way to avoid this is to do the opposite: to transform the light source into the "local" space. But what's the "local" space in this case?

Answer: You form the local space. You take the tangent, to the surface and the normal to the surface ... these are guaranteed to be orthogonal. You take the cross product of these two vectors to get the binormal, and now you have three orthogonal vectors. Normalize them, and hey presto, you have a basis. These three vectors are the local tangent space.

Once you have the basis, you can easily form a matrix which will transform from world space to tangent space. What's more, in the local tangent space, the unperturbed normal is (0,0,1). To perturb the normal (which is what you have to do in bump mapping), you have use an offset map, which consists of pairs (a,b), which can now be substituted directly into the normal as (a,b,1).

This allows you to very efficiently apply the illumination equation, with perturbations to the normal, which is what bump mapping is all about.

A tangent space is a useful structure which can be extracted from the differential structure of a differential manifold M. On such a manifold, it is handy to be able to define vectors, so that we can calculate things like, say, the velocity of a given curve defined on M. However, since a general manifold doesn't have to be defined as a subspace of flat euclidean space, we can no longer just think of a vector as some "arrow" living in the ambient space. In euclidean space, we would just draw an arrow, and state that it's "located" at the coordinates of the non-pointy end of the arrow, and it had a "direction" and "magnitude" given by the coordinates of the "point" of the arrow. We were able to get away with this nonsense because there was no curvature in euclidean space, and our vectors therefore are given by straight lines. The essential core of a vector is linearity, and it is that property of vectors that we cannot lose when generalizing to curved spaces. Therefore, we can no longer define our vectors as living in the manifold itself. If we try to represent our vectors as "curved" arrows in the manifold, there is no proper way of "adding" them together; we lose linearity. The bottom line is, we need a new place for our vectors to live. So, we seek to define the tangent space to M at any given point p in the manifold. This can be done in a few different ways.

If M is an n-dimensional differential manifold, the tangent space to M at p, denoted TpM, is an n-dimensional vector space. You might like to think of it as the "closest flat approximation to M at p", but so far, it's really just a copy of Rn where vectors at p can be defined.

Curves in the Manifold

Let's begin in a familiar setting. We look at the velocity vector for a curve in R3. Define the curve as a map C: (-1,1) → R3. In local coordinates on R3 (which we can just take to be the cartesian coordinates), we can represent C by (x1(t), x2(t), x3(t))*. The tangent vector to C inside of R3 is given by just taking the derivative with respect to the curve parameter, t: (dx1/dt|p, dx2/dt|p, dx3/dt|p). This can be interpreted as the velocity vector of the curve at the point p.

Now, there is no reason we can't do this for arbitrary manifolds; in a small enough neighborhood of a point p, we have a local coordinate representation of any curve passing through p, and thus we can compute the tangent vector to such a curve in those coordinates. We can then compare the tangent vectors to multiple curves passing through p in a natural way, since we can use the same coordinate representation to look at both curves.

All of this is useful to us, because in a way we can now associate vectors defined at a point p on M with curves in M passing through p; "vectors" are really just the velocities of curves. This definition is nice, because it is a completely coordinate-independent statement. Note, however, the relationship between vectors at p and curves passing through p is not a one-to-one mapping. For a given vector vp at p, there are many different curves passing through p which have the same velocity vp. Therefore, in order to associate the tangent space at p with the set of curves passing through p, we must first define an equivalence class of curves.

Consider the set of curves on M passing through p. An element Cj of this space is a map Ci: (-1,1) → M such that Cj(0) = p.

Define two such curves Cj and Ck to be "equivalent" when their tangent vectors at p agree in a local coordinate representation {xi} about p. You can check that this definition is independent of the choice of coordinates {xi}.

Now, we can define a tangent vector to M at p to be an element of the equivalence class of curves on M through p defined as above. The tangent space, TpM, is therefore the space of all such equivalence classes. Notice we use the notation vp, hilighting the fact that vectors at different points on the manifold live in different tangent spaces. Before defining additional structure, there is no way of comparing two vectors vp and vq at different points on the manifold.

This is one good way of defining the tangent space. It is nice because its definition does not rely on our choice of coordinates. However, it is a bit abstract, and therefore it is common to use the coordinate-dependent version, especially when doing calculations:

Coordinate Representations of Curves

Given a point p in M, and local coordinates {xi} on a neighborhood of p, the tangent space TpM is the space of all possible velocities (dC1/dt|p, dC2/dt|p, ..., dCn/dt|p) for curves C(t) mapping into M. The components of a vector v in M are given by the components of this coordinate representation for dC/dt;

vi = dCi/dt

Note that the components of v are coordinate-dependent. If we chose a different patch to represent the neighborhood of p in M, we would generally get different components vi. While v is a coordinate-independent object, its components are entirely coordinate-dependent.

Directional Derivatives

There is another way of defining a tangent vector space, which involves looking at derivatives of functions defined on M. At a point p, given a tangent vector, vp (defined in one of the two ways above), and a function f: M → R, we ask how quickly is f changing in the v-direction?

The notation we will use will be vp(f) = the directional derivative of f at p in the v-direction. To calculate vp(f), we choose an associated curve C in M through p (from the equivalence class of curves corresponding to v) with velocity v at p. Then, the rate of change of f in the v-direction is given by the rate of change of f o C with respect to the curve parameter t, evaluated at p:

vp(f) = d/dt(f(C(t)))|p.

This definition for vp(f) is manifestly coordinate-independent, since we haven't chosen a coordinate chart yet. However, we haven't yet shown that this definition is independent of our choice of curve, C (remember, we just picked one out of the set of curves with velocity v at p). We can do this by choosing a coordinate chart, {xi}, and carrying through the t-derivative using the chain rule:

vp(f) = d/dt(f(C(t)))|p = (df/dxi)(dxi/dt)|p

where xi(t) is just the coordinate representation of the curve C in M. Note we are implicitly summing over the coordinate index i, using the Einstein summation convention. Simplifying a little of the cumbersome notation, we write:

vp(f) = (dxi/dt) (∂if)

Thus, the directional derivative of f is specified by n parameters, dxi/dt, for i = {1,...,n}. These parameters are exactly the components vi in the coordinate representation given above. Now let us think of vp as an operator on functions in M. By the above equation, it is clear that this is a linear operator, and that its operation on functions is completely specified by the components vi. This means we have a new representation of our tangent space, TpM:

The tangent space TpM is the space of all directional derivative operators vp, acting on smooth functions f: M → R, and returning a real number given by the equation:

vp(f) = vi (∂if)|p.

So, now we can think of vectors as linear maps from functions into R. This concept is a bit abstract upon first viewing, so let's play with the algebra until you're a bit more convinced.

First of all, notice that by this definition adding two vectors together is the same thing as adding their components together, as one would expect. Secondly, multiplying a vector by a given constant just multiplies the components by a constant. Thus, directional derivative operators do form a linear space. Now, let's say we choose a given set of coordinates {xi} and choose a particular directional derivative, which we will call e1, given by e11 = 1, all other e1i = 0. We will show that this is one of a natural set of basis vectors for TpM. The equation above shows us how this operator acts on functions:

e1(f) = e1i (∂if) = ∂1f.

In other words, e1 = ∂1. Likewise, for any j, ej = ∂j, the j'th partial derivative. Since every directional derivative is a linear combination of partial derivatives, we can always express any vector in TpM as a linear combination of the ej's. Thus, we have established that we can think of {∂j} as a basis for TpM.

Change of Basis

Now that we're a bit more comfortable with the notion of a vector as a linear map, let's look at the consistency of this definition when going from one coordinate patch to another. Remember, when we first gave the definition for a directional derivative operator, we noted that it was manifestly coordinate-independent. However, when we chose a set of coordinates {xi}, we got a set of components for v, {vi}, which were coordinate-dependent. So, a natural question to ask would be: How exactly do the components vi for a vector v transform when we make a new choice of coordinates? This question is treated very thoroughly in the tensor node**, but the intuitive picture is that the components must somehow transform in a way "opposite" that of the basis vectors, so that the overall definition is coordinate-independent. Specifically, if the coordinate transformation results in a change of basis which can be represented as a matrix acting on basis vectors,

fi = ∂/∂yi = Mij ej = Mij ∂/∂xj

then the components of a given vector v must transform via the inverse matrix:

(v')i = (M -1)ij vj.

Since we are expressing the basis vectors as partial derivatives, the matrix is just given by the chain rule,

Mij = ∂xj/∂yi

and its inverse is given by using the chain rule in the opposite direction,

(M -1)ij = ∂yi/∂xj.

We have written down three equivalent approaches to understanding the tangent space TpM. In this third picture, we can think of TpM as all possible directional derivative operators at p on functions defined on M. In local coordinates, these are all expressible as linear combinations of partial derivatives, {∂/∂xj|p}, j = {1,...,n}. The transformation rule for a change of coordinates is just given by the chain rule on partial derivatives; the basis vectors transform like derivatives, and the components of a vector transform inversely to the basis vectors. If we wanted, we could now define vectors in a fourth way, i.e. that they are merely a set of components {vi} which transform via the inverse chain rule, as above. This definition for vectors would be entirely equivalent to the other three given above, but there is no corresponding intrinsic description of the space TpM. Vectors in this picture lose their intrinsic value as a mathematical object; they no longer "live" anywhere as an element of a topological space. This definition is the most common, however, because it's easiest for purposes of direct computation.

A Bigger Picture

Now that we've constructed the tangent space TpM from several different perspectives, it is a useful question to ask, "How is TpM related to TqM, for different points p and q in the manifold M?" We know that since the manifold is smooth, the vector spaces should somehow mesh smoothly with each other. We can also be sure about how this "meshing" should work on a global scale; this is how we define the tangent bundle, denoted simply TM. However, there is no god-given way of answering this question locally; we need to add additional structure to our manifold before we can compare tangent spaces. This leads to discussions of connections, parallel transport, covariant differentiation, and curvature. All of these notions can be defined before we add the further structure of a metric to the manifold.


*Try not to be confused by the fact that I'm using superscripts for the coordinate indices. This isn't supposed to represent "x squared" and "x cubed". It's just the most standard notation used for coordinate indices in this particular branch of mathematics and physics.
**This writeup was partially constructed as penance for my writeup in the tensor node. Since I produced that writeup, other noders created much better descriptions of tensors, describing them as multilinear maps acting on functions, rather than a set of components which transforms. It seemed silly to change my writeup at that point, considering that everything had been explained by others already, so I figured it would make better sense to try describing the place that vectors live, which is a similar but distinct concept.

Log in or register to write something here or to contact authors.