2017-11-20 23:28
geometric 与 algebraic 区别? 参考https://www.zhihu.com/question/40801339/answer/88292295
A significant advantage of the algebraic approach to geometry is that results derived in this way may more easily be used to derive algorithms and practical computational methods. Computation and algorithms are a major concern in this book, which justifies the use of the algebraic method.
平面上的一条线的方程表达式为ax+by+c=0,因此可以用vector (a,b,c)T来表示。
一个点x=
(x,y)T
如果在线上,则满足ax+by+c=0,可以用向量vector的内积来表示: (x,y,1)(a,b,c) T=0.
点就通过在最后面加一个1,来用3-vector表示:(x,y,1). 而一个非零的k表示的(kx,ky,k)表示的点也是(x,y)T,代表的都是同一个点。这是点的 homogeneous
vector 的表示方式。对于任意的一个 homogeneous vector : (x1,x2,x3)表示的点为:(x1/x3,x2/x3)T 。
Result2.1:The point x lies on the line l if and only if
xT
l = 0.
这个
xT
l是向量l和x的内积或者是标量积,
xT
l=
lT
x=l . x
最后一个“.”表示内积。
几个概念:
Degrees of freedom (dof)
Intersection of lines.
Result2.2. The intersection of two lines l and l ? is the point
x=l×l′
.
dot product 和cross product的定义:
http://blog.csdn.net/fox64194167/article/details/8147460
求两条线的交点用cross product就可以了,确实很方便。求出来是一个3-vector的向量,除以最后一个量就能变成2维的点了。
两条平行线算出来的交点是
(0,0,0)T
.
Line joining points
Result2.4. The line through two points
x
and
Intersectionof parallellines
ax+by+c=0
and
ax+by+c′=0
l=(a,b,c)T
and
l′=(a,b,c′)T
The intersection is
l×l′=(c?′−c)(b,−a,0)T
, and ignoring the scale
factor
(c′−c)
, this is the point
(b,−a,0)T
齐次坐标里的
(x,y,0)T
不对应
R2
空间的有限点。
Definition2.9. A projectivity is an invertible mapping h from IP 2 to itself such that three points x 1 , x 2 and x 3 lie on the same line if and only if
h(x1),h(x2)
and
h(x3)
do.
“projectivity ”也叫“collineation”,“projective transformation or a homography”
algebraic definition is :
Theorem2.10. A mapping h : IP 2 → IP 2 is a projectivity if and only if there exists a on-singular 3 × 3 matrix H such that for any point in IP 2 represented by a vector x it is true that h(x) = Hx.
一个变换h是射影变换的充要条件就是:存在一个非奇异的3x3矩阵,是的对x的h变换等于Hx。
简单的部分证明:
假设变换前
x1,x2,x3
共线,都在线
l
上,那么就有
即:
lTH−1Hxi
=0,即 点
Hxi
在线
lTH−1
上。
所以,也可以这样定义:
Definition2.11. Projective transformation. A planar projective transformation is a
linear transformation on homogeneous 3-vectors represented by a non-singular 3 × 3
matrix:
=
or more briefly, x′=Hx .
有9个变量,8个自由度。
这个矩阵H乘上任意一个非0标量,都不会改变射影关系。还记得:
(x1,x2,x3)T
=
(kx1,kx2,kx3)T
perspectivity:是projectivity变换的特例,有更严的约束。这时候有6个自由度。