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

目录

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

Affine independence

Consider first a set of three vectors in R3\R^3R3, say S={v1,v2,v3}S=\{\boldsymbol v_1, \boldsymbol v_2, \boldsymbol v_3\}S={v1​,v2​,v3​}. If SSS 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 {v1}\{\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 pp and q\boldsymbol qq is a line. If a third point r\boldsymbol rr 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 ss is not on the line through p\boldsymbol pp and q\boldsymbol qq, 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={v1,v2,v3}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 SSS is affinely independent.

EXAMPLE 3
Let

Determine whether S={v1,v2,v3,v4}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), v4−v1\boldsymbol v_4-\boldsymbol v_1v4​−v1​ is a linear combination of v2−v1\boldsymbol v_2-\boldsymbol v_1v2​−v1​ and v3−v1\boldsymbol v_3-\boldsymbol v_1v3​−v1​ .

So {v1,v2,v3,v4}\{\boldsymbol v_1,\boldsymbol v_2,\boldsymbol v_3,\boldsymbol v_4\}{v1​,v2​,v3​,v4​} is affinely dependent.


The grid on aff{v1,v2,v3}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 333 are called affineaffineaffine or barycentricbarycentricbarycentric coordinates of v4\boldsymbol v_4v4​. (仿射或重心坐标)

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~kp~]\begin{bmatrix}\widetilde\boldsymbol v_1 &...&\widetilde\boldsymbol v_k&\widetilde\boldsymbol p\end{bmatrix}[v1​​...​vk​​p​​] for (8) produces the barycentric coordinates of p\boldsymbol pp.

Barycentric coordinates have both physical and geometric interpretations. They were originally defined by A. F. Moebius in 1827 for a point p\boldsymbol pp inside a triangular region with vertices a\boldsymbol aa, b\boldsymbol bb, and c\boldsymbol cc. He wrote that the barycentric coordinates of p\boldsymbol pp are three nonnegative numbers ma,mbm_{\boldsymbol a},m_{\boldsymbol b}ma​,mb​, and mcm_{\boldsymbol c}mc​ such that p\boldsymbol pp is the center of mass of a system consisting of the triangle (with no mass) and masses ma,mbm_{\boldsymbol a},m_{\boldsymbol b}ma​,mb​, and mcm_{\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 Δabc\Delta abcΔabc and three small triangles Δpbc\Delta pbcΔpbc, Δapc\Delta apcΔapc, and Δabp\Delta abpΔabp. In fact, the areas of the small triangles are proportional to the barycentric coordinates of p\boldsymbol pp.


EXERCISE 21
For convenience, assume that a\boldsymbol aa, b\boldsymbol bb, and c\boldsymbol cc are arranged so that det[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 Δabc\Delta\boldsymbol a\boldsymbol b\boldsymbol cΔabc is det[a~b~c~]/2det\begin{bmatrix}\widetilde\boldsymbol a&\widetilde\boldsymbol b&\widetilde\boldsymbol c\end{bmatrix}/2det[a​b​c​]/2.
SOLUTION
[Hint: See Determinants as Area or Volume in section 3.3]

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

EXERCISE 23
Let p\boldsymbol pp be any point in the interior of Δabc\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~][rst]=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=det[p~b~c~]/det[a~b~c~]=(areaofΔpbc)/(areaofΔabc)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 qq on the line segment from b\boldsymbol bb to c\boldsymbol cc and consider the line through q\boldsymbol qq and a\boldsymbol aa, which may be written as p=(1−x)q+xa\boldsymbol p=(1-x)\boldsymbol q +x\boldsymbol ap=(1−x)q+xa for all real xxx. Show that, for each xxx, det[p~b~c~]=x⋅det[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​]=x⋅det[a​b​c​]. From this and earlier work, conclude that the parameter xxx is the first barycentric coordinate of p\boldsymbol pp. However, by construction, the parameter xxx also determines the relative distance between p\boldsymbol pp and q\boldsymbol qq along the segment from q\boldsymbol qq to a\boldsymbol aa.
SOLUTION

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


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 aa, b\boldsymbol bb, c\boldsymbol cc, and coordinate values r,s,tr, s, tr,s,t , as above. The points on the line through b\boldsymbol bb and c\boldsymbol cc, for instance, have r=0r = 0r=0 because they are affine combinations of only b\boldsymbol bb and c\boldsymbol cc. The parallel line through a\boldsymbol aa identifies points with r=1r= 1r=1.


A more detailed interpretation:
Let TTT be the triangle with vertices v1\boldsymbol v_1v1​, v2\boldsymbol v_2v2​, and v3\boldsymbol v_3v3​. When the sides of TTT are extended, the lines divide R2\R^2R2 into seven regions. See Figure 8. Note the signs of the barycentric coordinates of the points in each region. For example, p5\boldsymbol p_5p5​ is inside the triangle TTT and all its barycentric coordinates are positive. Point p1\boldsymbol p_1p1​ has coordinates (−,+,+)(-,+,+)(−,+,+). Its third coordinate is positive because p1\boldsymbol p_1p1​ is on the v3\boldsymbol v_3v3​ side of the line through v1\boldsymbol v_1v1​ and v2\boldsymbol v_2v2​. Its first coordinate is negative because p1\boldsymbol p_1p1​ is opposite the v1\boldsymbol v_1v1​ side of the line through v2\boldsymbol v_2v2​ and v3\boldsymbol v_3v3​.

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 v1\boldsymbol v_1v1​, v2\boldsymbol v_2v2​, and v3\boldsymbol v_3v3​ 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 pp. See Figure 6.


SOLUTION
First, find the barycentric coordinates of p\boldsymbol pp. 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 pp to make a linear combination of the color data. The RGB values for p\boldsymbol pp 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+tb\boldsymbol x(t)=\boldsymbol a+ t\boldsymbol bx(t)=a+tb for t≥0t\geq 0t≥0. Find the point where the ray x(t)\boldsymbol x(t)x(t) intersects the plane that contains the triangle with vertices v1\boldsymbol v_1v1​, v2\boldsymbol v_2v2​, and v3\boldsymbol v_3v3​. Is this point inside the triangle?
SOLUTION
The plane is aff{v1,v2,v3}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−c2−c3)v1+c2v2+c3v3(1-c_2-c_3)\boldsymbol v_1+c_2\boldsymbol v_2+c_3\boldsymbol v_3(1−c2​−c3​)v1​+c2​v2​+c3​v3​ for some c2c_2c2​ and c3c_3c3​. The ray x(t)\boldsymbol x(t)x(t) intersects the plane when c2,c3c_2, c_3c2​,c3​, and ttt satisfy


Rearrange this as c2(v2−v1)+c3(v3−v1)+t(−b)=a−v1c_2(\boldsymbol v_2 -\boldsymbol v_1)+ c_3(\boldsymbol v_3-\boldsymbol v_1)+ t(-\boldsymbol b) = a -\boldsymbol v_1c2​(v2​−v1​)+c3​(v3​−v1​)+t(−b)=a−v1​. In matrix form,


For the specific points given here,


Row reduction of the augmented matrix above produces


Thus c2=.3,c3=.1c_2=.3, c_3=.1c2​=.3,c3​=.1, and t=5t= 5t=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.

8.2 Affine independence (仿射无关性)相关推荐

  1. 线性代数之 向量空间几何学(1)仿射

    线性代数之 向量空间几何学(1)仿射 前言 仿射组合 仿射组合与向量空间 仿射无关性 总结 前言 本章是线性代数最后一节内容,向量空间与几何学. 仿射组合 定义仿射组合:对于RnR^nRn中的向量v⃗ ...

  2. 《 线性代数及其应用 (原书第4版)》—— 导读

    前 言 学生和教师对本书前三版本的反响十分令人满意. 第4版在第3版的基础上为课程教学和软件技术应用提供了更多支持. 像以前一样,本书给出最新的线性代数基本介绍和一些有趣应用,使得已完成大学第二学期数 ...

  3. 一个算法“拿下”两个榜单!爱奇艺ICCV 2021论文提出人手三维重建新方法

    2016年,Facebook正式发售Oculus Rift头戴式VR设备,大大革新了人们对于VR技术的认知,这一年也因此被称为VR元年.5年过去,现在VR技术发展到哪了?从原生VR游戏<半条命: ...

  4. R语言普通最小二乘(OLS)回归说明、以及构建普通最小二乘(OLS)回归需要满足的四个假设(Normality(正态性)、Independence(独立性)、Linearity(线性度)、方差齐性)

    R语言普通最小二乘(OLS)回归说明.以及构建普通最小二乘(OLS)回归需要满足的四个假设(Normality(正态性).Independence(独立性).Linearity(线性度).方差齐性) ...

  5. 最全面的homogeneous单应性坐标的定义,以及不同投影,仿射,相似,刚体变换矩阵的关系和自由度分析

    本文对图像的投影变换,做了最基础和全面的总结.包括了摄影几何,homogeneous单应性坐标与变换矩阵分析. 1. Homogeneous Coordinate的定义 2. 使用Homogeneou ...

  6. OpenCV中的「透视变换 / 投影变换 / 单应性」—cv.warpPerspective、cv.findHomography

    文章目录 引言 透视变换(projective transform) 单应性(Homography) opencv代码 仿射变换相关函数 投影变换相关的函数 鸟瞰图代码示例 小结 引言 图像的几何变换 ...

  7. amos调节变量怎么画_AMOS 中验证性因素分析(CFA)

    * 没有数据缺失时选用极大似然估计法(Maximum Likelihood Estimates) 有数据确实时选用Full Information Maximum Likelihood (Arbuck ...

  8. 仿射变换 Affine transformation

    这个太重要了,我得再研究研究.并争取搞个code出来.这篇先来理论. 本文属转载. 变换模型是指根据待匹配图像与背景图像之间几何畸变的情况,所选择的能最佳拟合两幅图像之间变化的几何变换模型.可采用的变 ...

  9. 创作者经济:「正统性危机」之下的变革之路

    撰文:Li Jin & Katie Parrot 编辑:南风 当历史学家们书写「创作者经济」的崛起时,有两个时刻 (相隔十年) 肯定会出现.第一个时刻是在 2007 年春天,YouTube 开 ...

最新文章

  1. 2018-3-25论文(Grey Wolf Optimizer)自然界狼群的生活等级
  2. Tomcat6下使用jBPM-4出现 java.lang.LinkageError。javax/el/ExpressionFactory解决办法
  3. 关于python语言和人工智能哪个说法不正确_在 Windows 7 操作系统中,下列说法错误的是( )。_计算机文化基础答案_学小易找答案...
  4. 利用K8S技术栈打造个人私有云(连载之:K8S资源控制)
  5. 前端学习(1368):app.use使用
  6. Symbol在对象中的作用
  7. 解决图片三像素的问题
  8. Himall商城普通帮助类(四)
  9. python文本挖掘教程,4个步骤教你轻松完成文本挖掘预处理(附python代码)
  10. 求一个乘法算式采用几进制
  11. JS: || 和 ??
  12. 服务器托管的作用,有哪些好处?
  13. python气象绘图相关链接
  14. tomtom地图 android,TomTomGPS导航
  15. STP格式公仔3D建模,IGS格式模型设计中文讲解视频教程
  16. squirrel 通过phoenix 连接 hbase
  17. java--for循环及相关案例
  18. html设置表单禁止修改群名片,怎样设置微信别人不能修改群名
  19. python能参加信息安全吗_Python 信息安全工具开发 - 安全牛课堂 - 领先的信息安全在线教育平台...
  20. 曲线数据提取-图片转数据或曲线重绘,曲线更换颜色及曲线复现

热门文章

  1. Android 实现三级联动 国家统计局全国省市县行政区域最新划分数据库
  2. 物联网智能家居需要服务器吗,智能家居设备常见的两种配网/联网方式
  3. python面向过程之水果超市
  4. 《超大流量分布式系统架构解决方案》
  5. 安装 pycuda 出现 PEP517 的错误
  6. 访问修饰符有哪些?及作用范围
  7. 十款英文像素字体下载
  8. 1.7 什么是软件生命周期模型?试比较瀑布模型,快速原型模型,增量模型和螺旋模型的优缺点,说明每种模型的适用范围
  9. matlab标准化和反标准化——zscore
  10. 男人四十一枝花,我花开后百花杀!Orz..繁忙的工作之余,joke一下~~