8.2 Affine independence (仿射无关性)

本文为《Linear algebra and its applications》的读书笔记

Affine independence

Consider first a set of three vectors in R 3 \R^3 R3, say S = { v 1 , v 2 , v 3 } S=\{\boldsymbol v_1, \boldsymbol v_2, \boldsymbol v_3\} S={ v1,v2,v3}. If S S S is linearly dependent, then one of the vectors is a linear combination of the other two vectors. What happens when one of the vectors is an affine combination of the others? For instance, suppose that

在这里插入图片描述
Then

在这里插入图片描述

This is a linear dependence relation because not all the weights are zero. But more is true—the weights in the dependence relation sum to 0. This is the additional property needed to define affine dependence.

在这里插入图片描述

Indexed set of points: elements of different index can be the same point.

An affine combination is a special type of linear combination, and affine dependence is a restricted type of linear dependence. Thus, each affinely dependent set is automatically linearly dependent.

A set { v 1 } \{\boldsymbol v_1\} { v1} of only one point (even the zero vector) is affinely independent.

在这里插入图片描述

Parts ( c ) (c) (c) and ( d ) (d) (d) give useful methods for determining whether a set is affinely dependent.
可以由 ( c ) (c) (c) 将问题平移到原点处来处理,也可以由 ( d ) (d) (d) 利用更高维的齐次坐标解决

EXAMPLE 1
The affine hull of two distinct points p \boldsymbol p p and q \boldsymbol q q is a line. If a third point r \boldsymbol r r is on the line, then { p , q , r } \{\boldsymbol p,\boldsymbol q,\boldsymbol r\} { p,q,r} is an affinely dependent set. If a point s \boldsymbol s s is not on the line through p \boldsymbol p p and q \boldsymbol q q, then these three points are not collinear(共线) and { p , q , r } \{\boldsymbol p,\boldsymbol q,\boldsymbol r\} { p,q,r} is an affinely independent set. See Figure 1.

在这里插入图片描述
Example 1 provides a fast way to determine when three points are collinear.

EXAMPLE 2
Let

在这里插入图片描述
Determine whether S = { v 1 , v 2 , v 3 } S=\{\boldsymbol v_1,\boldsymbol v_2,\boldsymbol v_3\} S={ v1,v2,v3} is affinely independent.
SOLUTION

在这里插入图片描述
These two points are not multiples and hence form a linearly independent set. So S S S is affinely independent.

在这里插入图片描述

EXAMPLE 3
Let
在这里插入图片描述
Determine whether S = { v 1 , v 2 , v 3 , v 4 } S=\{\boldsymbol v_1,\boldsymbol v_2,\boldsymbol v_3,\boldsymbol v_4\} S={ v1,v2,v3,v4} is affinely independent.
SOLUTION
By calculation (omitted here), v 4 − v 1 \boldsymbol v_4-\boldsymbol v_1 v4v1 is a linear combination of v 2 − v 1 \boldsymbol v_2-\boldsymbol v_1 v2v1 and v 3 − v 1 \boldsymbol v_3-\boldsymbol v_1 v3v1 .

在这里插入图片描述

So { v 1 , v 2 , v 3 , v 4 } \{\boldsymbol v_1,\boldsymbol v_2,\boldsymbol v_3,\boldsymbol v_4\} { v1,v2,v3,v4} is affinely dependent.

在这里插入图片描述
The grid on a f f { v 1 , v 2 , v 3 } aff\{\boldsymbol v_1,\boldsymbol v_2,\boldsymbol v_3\} aff{ v1,v2,v3} is based on (5). Another “coordinate system” can be based on (6), in which the coefficients − 4 , 2 -4, 2 4,2, and 3 3 3 are called a f f i n e affine affine or b a r y c e n t r i c barycentric barycentric coordinates of v 4 \boldsymbol v_4 v4. (仿射或重心坐标)

Barycentric Coordinates 重心坐标

The definition of barycentric coordinates depends on the following affine version of the Unique Representation Theorem in Section 4.4.

在这里插入图片描述
在这里插入图片描述
Observe that (7) is equivalent to the single equation

在这里插入图片描述
Row reduction of the augmented matrix [ v ~ 1 . . . v ~ k p ~ ] \begin{bmatrix}\widetilde\boldsymbol v_1 &...&\widetilde\boldsymbol v_k&\widetilde\boldsymbol p\end{bmatrix} [v 1...v kp ] for (8) produces the barycentric coordinates of p \boldsymbol p p.

Barycentric coordinates have both physical and geometric interpretations. They were originally defined by A. F. Moebius in 1827 for a point p \boldsymbol p p inside a triangular region with vertices a \boldsymbol a a, b \boldsymbol b b, and c \boldsymbol c c. He wrote that the barycentric coordinates of p \boldsymbol p p are three nonnegative numbers m a , m b m_{\boldsymbol a},m_{\boldsymbol b} ma,mb, and m c m_{\boldsymbol c} mc such that p \boldsymbol p p is the center of mass of a system consisting of the triangle (with no mass) and masses m a , m b m_{\boldsymbol a},m_{\boldsymbol b} ma,mb, and m c m_{\boldsymbol c} mc at the corresponding vertices. The masses are uniquely determined by requiring that their sum be 1.

Figure 4 gives a geometric interpretation to the barycentric coordinates, showing the triangle Δ a b c \Delta abc Δabc and three small triangles Δ p b c \Delta pbc Δpbc, Δ a p c \Delta apc Δapc, and Δ a b p \Delta abp Δabp. In fact, the areas of the small triangles are proportional to the barycentric coordinates of p \boldsymbol p p.

在这里插入图片描述
EXERCISE 21
For convenience, assume that a \boldsymbol a a, b \boldsymbol b b, and c \boldsymbol c c are arranged so that d e t [ a ~ b ~ c ~ ] det\begin{bmatrix}\widetilde\boldsymbol a&\widetilde\boldsymbol b&\widetilde\boldsymbol c\end{bmatrix} det[a b c ] is positive. Show that the area of Δ a b c \Delta\boldsymbol a\boldsymbol b\boldsymbol c Δabc is d e t [ a ~ b ~ c ~ ] / 2 det\begin{bmatrix}\widetilde\boldsymbol a&\widetilde\boldsymbol b&\widetilde\boldsymbol c\end{bmatrix}/2 det[a b c ]/2.
SOLUTION
[Hint: See Determinants as Area or Volume in section 3.3]

EXERCISE 22
Let p \boldsymbol p p be a point on the line through a \boldsymbol a a and b \boldsymbol b b. Show that d e t [ a b p ] = 0 det\begin{bmatrix}\boldsymbol a&\boldsymbol b&\boldsymbol p\end{bmatrix}=0 det[abp]=0.
SOLUTION
The proof is easy but the conclusion will be used later.

EXERCISE 23
Let p \boldsymbol p p be any point in the interior of Δ a b c \Delta\boldsymbol a\boldsymbol b\boldsymbol c Δabc, with barycentric coordinates ( r , s , t ) (r, s, t) (r,s,t), so that
在这里插入图片描述
Show that
在这里插入图片描述
SOLUTION
If [ a ~ b ~ c ~ ] [ r s t ] = p ~ \begin{bmatrix}\widetilde\boldsymbol a&\widetilde\boldsymbol b&\widetilde\boldsymbol c\end{bmatrix}\begin{bmatrix}r\\s\\t\end{bmatrix}=\widetilde\boldsymbol p [a b c ]rst=p , then by Cramer’s rule, r = d e t [ p ~ b ~ c ~ ] / d e t [ a ~ b ~ c ~ ] = ( a r e a   o f   Δ p b c ) / ( a r e a   o f   Δ a b c ) r=det\begin{bmatrix}\widetilde\boldsymbol p&\widetilde\boldsymbol b&\widetilde\boldsymbol c\end{bmatrix}/det\begin{bmatrix}\widetilde\boldsymbol a&\widetilde\boldsymbol b&\widetilde\boldsymbol c\end{bmatrix}=(area\ of\ \Delta\boldsymbol p\boldsymbol b\boldsymbol c)/(area\ of\ \Delta\boldsymbol a\boldsymbol b\boldsymbol c) r=det[p b c ]/det[a b c ]=(area of Δpbc)/(area of Δabc)

EXERCISE 24
Take q \boldsymbol q q on the line segment from b \boldsymbol b b to c \boldsymbol c c and consider the line through q \boldsymbol q q and a \boldsymbol a a, which may be written as p = ( 1 − x ) q + x a \boldsymbol p=(1-x)\boldsymbol q +x\boldsymbol a p=(1x)q+xa for all real x x x. Show that, for each x x x, d e t [ p ~ b ~ c ~ ] = x ⋅ d e t [ a ~ b ~ c ~ ] det\begin{bmatrix}\widetilde\boldsymbol p&\widetilde\boldsymbol b&\widetilde\boldsymbol c\end{bmatrix}=x\cdot det\begin{bmatrix}\widetilde\boldsymbol a&\widetilde\boldsymbol b&\widetilde\boldsymbol c\end{bmatrix} det[p b c ]=xdet[a b c ]. From this and earlier work, conclude that the parameter x x x is the first barycentric coordinate of p \boldsymbol p p. However, by construction, the parameter x x x also determines the relative distance between p \boldsymbol p p and q \boldsymbol q q along the segment from q \boldsymbol q q to a \boldsymbol a a.
SOLUTION

Analogous equalities for volumes of tetrahedrons(四面体) hold for the case when p \boldsymbol p p is a point inside a tetrahedron in R 3 \R^3 R3, with vertices a \boldsymbol a a, b \boldsymbol b b, c \boldsymbol c c, and d \boldsymbol d d.


When a point is not inside the triangle (or tetrahedron), some of the barycentric coordinates will be negative. The case of a triangle is illustrated in Figure 5, for vertices a \boldsymbol a a, b \boldsymbol b b, c \boldsymbol c c, and coordinate values r , s , t r, s, t r,s,t , as above. The points on the line through b \boldsymbol b b and c \boldsymbol c c, for instance, have r = 0 r = 0 r=0 because they are affine combinations of only b \boldsymbol b b and c \boldsymbol c c. The parallel line through a \boldsymbol a a identifies points with r = 1 r= 1 r=1.

在这里插入图片描述


A more detailed interpretation:
Let T T T be the triangle with vertices v 1 \boldsymbol v_1 v1, v 2 \boldsymbol v_2 v2, and v 3 \boldsymbol v_3 v3. When the sides of T T T are extended, the lines divide R 2 \R^2 R2 into seven regions. See Figure 8. Note the signs of the barycentric coordinates of the points in each region. For example, p 5 \boldsymbol p_5 p5 is inside the triangle T T T and all its barycentric coordinates are positive. Point p 1 \boldsymbol p_1 p1 has coordinates ( − , + , + ) (-,+,+) (,+,+). Its third coordinate is positive because p 1 \boldsymbol p_1 p1 is on the v 3 \boldsymbol v_3 v3 side of the line through v 1 \boldsymbol v_1 v1 and v 2 \boldsymbol v_2 v2. Its first coordinate is negative because p 1 \boldsymbol p_1 p1 is opposite the v 1 \boldsymbol v_1 v1 side of the line through v 2 \boldsymbol v_2 v2 and v 3 \boldsymbol v_3 v3.

在这里插入图片描述

Barycentric Coordinates in Computer Graphics 计算机图形学中的重心坐标

When working with geometric objects in a computer graphics program, a designer may use a “wire-frame”(线框) approximation to an object at certain key points in the process of creating a realistic final image. For instance, if the surface of part of an object consists of small flat triangular surfaces, then a graphics program can easily add color, lighting, and shading to each small surface when that information is known only at the vertices. Barycentric coordinates provide the tool for smoothly interpolating(插入) the vertex information over the interior of a triangle. The interpolation at a point is simply the linear combination of the vertex values using the barycentric coordinates as weights.

Colors on a computer screen are often described by RGB coordinates. A triple ( r , g , b ) (r, g, b) (r,g,b) indicates the amount of each color—red, green, and blue—with the parameters varying from 0 to 1.

EXAMPLE 5
Let
在这里插入图片描述
The colors at the vertices v 1 \boldsymbol v_1 v1, v 2 \boldsymbol v_2 v2, and v 3 \boldsymbol v_3 v3 of a triangle are magenta ( 1 , 0 , 1 ) (1, 0, 1) (1,0,1), light magenta ( 1 , 4 , 1 ) (1,4, 1) (1,4,1), and purple ( 6 , 0 , 1 ) (6, 0, 1) (6,0,1), respectively. Find the interpolated color at p \boldsymbol p p. See Figure 6.

在这里插入图片描述
SOLUTION
First, find the barycentric coordinates of p \boldsymbol p p. Here is the calculation using homogeneous forms of the points, with the first step moving row 4 to row 1:

在这里插入图片描述
Use the barycentric coordinates of p \boldsymbol p p to make a linear combination of the color data. The RGB values for p \boldsymbol p p are

在这里插入图片描述
One of the last steps in preparing a graphics scene for display on a computer screen is to remove “hidden surfaces” that should not be visible on the screen. Imagine the viewing screen as consisting of, say, a million pixels, and consider a ray(射线) or “line of sight” from the viewer’s eye through a pixel and into the collection of objects that make up the 3D display. The color and other information displayed in the pixel on the screen should come from the object that the ray first intersects. See Figure 7. When the objects in the graphics scene are approximated by wire frames with triangular patches(三角面), the hidden surface problem can be solved using barycentric coordinates.

在这里插入图片描述
The mathematics for finding the ray-triangle intersections (射线-三角形相交) can also be used to perform extremely realistic shading of objects(逼真的物体着色). Currently, this ray-tracing method(光线跟踪着色法) is too slow for real-time rendering, but recent advances in hardware implementation may change that in the future.

EXAMPLE 6
Let

在这里插入图片描述
and x ( t ) = a + t b \boldsymbol x(t)=\boldsymbol a+ t\boldsymbol b x(t)=a+tb for t ≥ 0 t\geq 0 t0. Find the point where the ray x ( t ) \boldsymbol x(t) x(t) intersects the plane that contains the triangle with vertices v 1 \boldsymbol v_1 v1, v 2 \boldsymbol v_2 v2, and v 3 \boldsymbol v_3 v3. Is this point inside the triangle?
SOLUTION
The plane is a f f { v 1 , v 2 , v 3 } aff\{\boldsymbol v_1,\boldsymbol v_2,\boldsymbol v_3\} aff{ v1,v2,v3}. A typical point in this plane may be written as ( 1 − c 2 − c 3 ) v 1 + c 2 v 2 + c 3 v 3 (1-c_2-c_3)\boldsymbol v_1+c_2\boldsymbol v_2+c_3\boldsymbol v_3 (1c2c3)v1+c2v2+c3v3 for some c 2 c_2 c2 and c 3 c_3 c3. The ray x ( t ) \boldsymbol x(t) x(t) intersects the plane when c 2 , c 3 c_2, c_3 c2,c3, and t t t satisfy

在这里插入图片描述
Rearrange this as c 2 ( v 2 − v 1 ) + c 3 ( v 3 − v 1 ) + t ( − b ) = a − v 1 c_2(\boldsymbol v_2 -\boldsymbol v_1)+ c_3(\boldsymbol v_3-\boldsymbol v_1)+ t(-\boldsymbol b) = a -\boldsymbol v_1 c2(v2v1)+c3(v3v1)+t(b)=av1. In matrix form,

在这里插入图片描述
For the specific points given here,

在这里插入图片描述
Row reduction of the augmented matrix above produces

在这里插入图片描述
Thus c 2 = . 3 , c 3 = . 1 c_2=.3, c_3=.1 c2=.3,c3=.1, and t = 5 t= 5 t=5. Therefore, the intersection point is

在这里插入图片描述
Also,

在这里插入图片描述
The intersection point is inside the triangle because the barycentric weights for x ( 5 ) \boldsymbol x(5) x(5) are all positive.

猜你喜欢

转载自blog.csdn.net/weixin_42437114/article/details/109103439
8.2