3D几何.pdf

所需积分/C币:15 2018-04-28 14:40:40 564KB PDF
收藏 收藏
举报

3D几何的概要以及原理分析,着重分析了3D几何里面的重要理论和知识。
Chapter 1 Preliminaries E piu facile resister all inizio che alla fine It is easier to resist at the beginning than the end Leonardo da vinci 1.1 Scalars Scalars are things like real numbers that can be added or multiplied together. There are three types o scalars of interest in this book; Real numbers(R), Complex numbers(C) and Quaternions(H). This book will assume familiarity with Real and Complex numbers which form a field, ie they follow these Addition: They can be added together and addition is commutative: a+6=b+a Multiplication: They can be multiplied together and multipliation is commutative: a6-6.a Associativity: Addition and multiplication are associative:(a+b)+c=a+(b+c)and(a b)c .0: There is a zero element that can be added to anything to give that same number: a+0=a 1: There is a one element that can be multiplied to anything to give that same number: a 1=a Additive Inverse: Every clement has an additive inverse, a numbcr that can be added to it to give zero: a+-a=0 Multiplicative Inverse: Every element except o has a multiplicative inverse, a number that can be multiplied to it to give one:a.I=1 Distributivity: Multiplication distributes ovcr addition: a(6+c)=(ab)+(a c) Quaterions follow the same rules as complex numbers except that instead of having one imaginary axis they have three denoted i, and k. As for complex numbers i 1 and similarly 3 1 and k- Finally iik=-1. This mcans that ii= h but ji=h, so i and i do not commute(brcaking thc rulc about multiplicaTion being coInInutalive)and so quaterniOns are not a field 1.2 Vector spaces A vcctor spacc is a sct of things that can be added togcther or multiplied by scalars following thesc rules Addition: Vectors can be added together. Addition is commutative: V1+V2 associative:(V1+v2)+V3=V1+(v2+v3), there is a zero vector: v+0=v and vectors have additive inverses:V+-v=0 Multiplication: Vectors can be multiplied by scalars. Multiplication distributes over vector addi tion: a(v1+v2)-avi +av2, and also over scalar addition:(a+b)v=av+bv This book will mostly be concerned with vector spaces over real numbers. The most obvious example of these are elements of r which are written as a column of n real numbers in parentheses C Vectors are not the only things that live in a vector space, however. Matrices(see below also satisfy the rules 1.2.1 Basis of a vector space a basis for a vector space is a set of linearly independent vectors that span the space. Linear independence means that no basis vector can be expressed as a weighted sum of other basis vectors. ""Span the space means that all vectors in the space can be expressed (uniquely) as a weighted sum of basis vectors 1.3 Matrices Matrices are linear transformations from one vector space to another. Linear transformations have to satisfy two rulcs. If M is a lincar transformation, u and v arc vectors and A is a scalar, then Commuting with scalars: M(Au)=X(Mu Distribution over vector addition: M(u+v)=(Mu)+(mu) Matrices are represented as lables of lumbers, for example M=34 represents a linear transformation. This matrix transforms vectors in R2 into vectors in R. For example M transforms the vector(2)into the vector 34 56 1.3.1 Matrices as a vector space Note Chiat two matrices of the salne size call be added together anld Therefore the set of matrices of a given size form a vector space. Subsets of these can matrices also form vector spaces, e.g. the set of upper triangular 2 X 2 matrices form a 3-dimensional vector space, where each matrix looks like A basis for this vector space consists of three matrices, for example 0 00 and 00 form a basis for this vector space 1.4 Groups If both vector spaces a Te RN, then the matrices are square n xn arrays. Such matrices can be multiplied together to obtain a new matrix of the same size. Provided that matrices with zero determinant are avoided, such matrices form a group with the following properties Closure: If g1 and 92 are members of a group then the product 9192 must also be in the group Identity: A group must contain an identity element, I such that if g is in the group then gl Ig=g(the Identity matrix fulfills this requirement) transpose of a rotation matrix always exists and fulfills this requirement/ that gh= hg=/(the Inverse: If g is a member of the group then it has a unique inverse h such 1.5 3D Coordinates In order to do any 3D geometry at all, it is necessary to find a way of agreeing where in 3D space something is. The most fundamental way to do this is to give the coordinates of a point, which can be expressed as a vector Figurc 1.1: Coordinates of a point Figure 1. 1 shows how the coordinates of the centre of the green dot can be found by counting 3 units along the x axis, 2 units along y and 2 units along z. This point lives in real three dimensional space written R. In order for everyone to agree about which point we're talking about in space, we need to agree where the origin of the coordinate system is, which directions the x, y and z axes run in and what the unit of measurement is 1.5.1 Rotations If a different set of directions are chosen, the coordinate values of the same point will be different as seen in figure 1.2 This happens a lot in 3D gcomctry bccausc it's convcnicnt to have many diffcrcnt coordinatc frames for diferent purposes. Fortunalely coordinales in one frame are simply relaled lo those in a rotated fraine RIyi where R is a3×3 matrix .6 In the example in figure 1.2, R is given by 0.7070.7070 R=-0.7070.7070 01 The coordinates in figure 1.2 can be obtained by multiplying the coordinates given in figure 1.1 07070.7070/3 3.535 0.7070.70702 0.707 0 Not all 3 x 3 matrices represent a simple rotation of the coordinate axes. In fact the constraints on R arc quite strong: 1. the length of a vector must be conserved 2. the coordinate axes Inust be orthogonal (at right anigles) lo each other 3. the coordinate frame must remain right-handed The columns of R correspond to unit vectors pointing along the coordinate axes of the old frame expressed in the new coordinate system. This can be seen because the first column of R is the result of transforming the unit vector pointing in the direction of the original axis, (1,0,0)T 0.7070.707 0.707 07070.70700 0.707 (1.9) 0 and the other two columns can be retrieved by multiplying R by(0, 1, 0) and (0, 0, 1) The three conditions can then be interpreted to provide constraints on the columns of R. Condition I mcans that the magnitudc of cach column of R must bc 1. Condition 2 mcans that the thrcc columns of R must be orthogonal to each other (their pairwise dot products must be 0). Finally, condition 3 means that the determinant of R must be 1(not -1) The first two conditions also mcans that RR= T 3.54 Figurc 1.2: Coordinates of thc same point with a rotated sct of axes since if we write r in terms of its 3 column s,r1, r2 and r3, equat ion l lo becomes 100 T2 T 010 001 since r ri =1(the magnitude of each column is 1)and r/,=0(i+ j)(different columns are orthogonal Note that the identity matrix. I is a valid rotation matrix This means that for a rotation matrix, R-=R(the inverse is equal to the transpose). This in turn means that RRT=I since a matrix always commutes with its inverse R-1B=I→BR-1B=RⅠ=R=IR B21=I Conscqucntly, this also mcans that thc rous of R must also be unit length and orthogonal The final property of rotation matrices is that if two are multiplied together, the result must also be a rotation matrix. This can be seen because if M= Ri R2 then MM-R2RR1R (1.13) roRO R2 R2 This means that the columns(and rows )of M must also be unit length and orthogonal and its determinant the product of the determinants of Rl and R2(-1x1-1) All of these properties together mean that rotation matrices satisfy the conditions to be a group. This group is called the Special Orthogonal group in 3 dimensions, SO(3 1.5.2 Translations In addition to rotating axes. it is often advantageous to choose the origin to be in a different place. Figure 1.3 shows an example of the same point in a translated(shifted) coordinate frame y O Figure 1. 3: Coordinates of the same point with a translated set of axes To convert coordinates into this new frame, it is necessary to add a constant vector to the vector of coordinates in the old framc 91+t where t is a 3-vector (1.17 t is the location of the origin of the first coordinate frame in the second coordinate frame. In the example in figure 1.3 (1.18) 1.5.3 Combined rotation and translation The general case involves both a rotation and a translation simultaneously as shown in Figure 1. 4 1414 X X Figurc 1.4: Coordinates of thc same point with a gencral (rotated and translated sct of axes In this case, it is necessary to apply a rotation and a translation to obtain the new coordinates 2 92 where l is a 3-vectc (1.19) ll the exalmple in Figure 1.4, R and t are given by 0.7070.7070 2.121 0.7070.7070 t=0.:707 (1.20) 0 and the coordinate transformation for the green dot can be calculated as 0.7070.7070 2.121 -0.7070.7070 0.707 (1.21) 0 3.535 2.121 0.707 0.707 (1.22) 1.414 2 1.5.4 Homogeneous coordinates A common trick for dealing with these kinds of coordinate transformations is to represent 3d points with a 4-vector by adding a I to the end of the 3 coordinates. These are called homogeneous coordinates Csing this, the coordinates of the green dot in its original coordinate frame can be represented as y (1.24) This makes it possible to represent the rotation and translation with a single matrix of the form (1.25) 0001 Applying this matrix to the coordinates of the green dot gives 07070.7070-2.1211/3 1.414 0.7070.70700.707 2 (1.26) 001 Matrices of the form given in equation 1. 25 also form a group. The identity matrix has the correct form so be a member of the group and the inverse is given by T Rt (1.27) 000 000 So the inverse of the matrix in equation 1.26 is given by 0.7070.7070-2.121 0.707-0.70702 0.7070.70700.707 0.7070.70701 010 (1.28) 00 0 Enginccrs usually rcfor to this group as the Spccial Euclidean group in 3 dimensions, SE(3). In this context, "Euclidean'eans "rigid body Lotions

...展开详情
试读 33P 3D几何.pdf
立即下载 低至0.43元/次 身份认证VIP会员低至7折
抢沙发
一个资源只可评论一次,评论内容不能少于5个字
关注 私信 TA的资源
上传资源赚积分,得勋章
最新推荐
3D几何.pdf 15积分/C币 立即下载
1/33
3D几何.pdf第1页
3D几何.pdf第2页
3D几何.pdf第3页
3D几何.pdf第4页
3D几何.pdf第5页
3D几何.pdf第6页
3D几何.pdf第7页

试读结束, 可继续读3页

15积分/C币 立即下载 >