大三05計(jì)算機(jī)圖形學(xué)_第1頁(yè)
大三05計(jì)算機(jī)圖形學(xué)_第2頁(yè)
大三05計(jì)算機(jī)圖形學(xué)_第3頁(yè)
大三05計(jì)算機(jī)圖形學(xué)_第4頁(yè)
大三05計(jì)算機(jī)圖形學(xué)_第5頁(yè)
已閱讀5頁(yè),還剩22頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、1Representation幾何表示原著Ed AngelProfessor of Computer Science, Electrical and Computer Engineering, and Media ArtsUniversity of New Mexico編輯 武漢大學(xué)計(jì)算機(jī)學(xué)院圖形學(xué)課程組2ObjectivesIntroduce concepts such as dimension and basis維數(shù)與基等概念I(lǐng)ntroduce coordinate systems for representing vectors spaces Introduce frames for r

2、epresenting affine spacesDiscuss change of frames and bases討論基與標(biāo)架的變換Introduce homogeneous coordinates引進(jìn)齊次坐標(biāo)3Outline4.3 Coordinate System and Frames坐標(biāo)系與標(biāo)架4.3.1 - 4.3.64.4 Frames in openGL openGL 中的標(biāo)架44.3 Coordinate System and Frames (Linear Independence線性無(wú)關(guān))A set of vectors v1, v2, , vn is linearly i

3、ndependent if一組向量v1, v2 , vn稱為線性無(wú)關(guān)的,是指 a1v1+a2v2+. anvn=0 iff a1=a2=0If a set of vectors is linearly independent, we cannot represent one in terms of the others如果一組向量是線性無(wú)關(guān)的,那么不能把其中一個(gè)向量表示成其它向量的線性組合If a set of vectors is linearly dependent, as least one can be written in terms of the others如果一組向量是線性相關(guān)

4、的,那么其中至少有一個(gè)向量可以表示為其它向量的線性組合54.3 Coordinate System and Frames (Dimension維數(shù))In a vector space, the maximum number of linearly independent vectors is fixed and is called the dimension of the space在向量空間中,最大的線性無(wú)關(guān)向量組的元素個(gè)數(shù)是固定的,這個(gè)數(shù)就稱為空間的維數(shù)In an n-dimensional space, any set of n linearly independent vectors

5、form a basis for the space在n維空間中,任意n個(gè)線性無(wú)關(guān)的向量構(gòu)成空間的基Given a basis v1, v2,., vn, any vector v can be written as給定空間的一組基v1, v2 , vn,空間中任意向量v都可以表示為 v=a1v1+ a2v2 +.+anvnwhere the ai are unique其中i是唯一的64.3 Coordinate System and Frames(Representation表示)Until now we have been able to work with geometric entit

6、ies without using any frame of reference, such as a coordinate system到現(xiàn)在為止我們只是討論幾何對(duì)象,而沒(méi)有使用任何參考標(biāo)架,例如坐標(biāo)系Need a frame of reference to relate points and objects to our physical world.需要一個(gè)參考標(biāo)架把點(diǎn)和對(duì)象與物理世界中的對(duì)象聯(lián)系在一起For example, where is a point? Cant answer without a reference system例如,點(diǎn)在哪兒?如果沒(méi)有參考系的話,就無(wú)法回答這個(gè)

7、問(wèn)題World coordinates世界坐標(biāo)系Camera coordinates照相機(jī)坐標(biāo)系4.3 Coordinate System and Frames(Representation表示)世界坐標(biāo)系:是系統(tǒng)的絕對(duì)坐標(biāo)系,在沒(méi)有建立用戶坐標(biāo)系之前畫面上所有點(diǎn)的坐標(biāo)都是以該坐標(biāo)系的原點(diǎn)來(lái)確定各自的位置的。784.3 Coordinate System and Frames (Coordinate Systems坐標(biāo)系)Consider a basis考慮n維向量空間的基 v1, v2,., vnA vector is written一個(gè)向量v可以表示為 v=a1v1+ a2v2 +.+an

8、vnThe list of scalars標(biāo)量a1, a2, . an is the representation of v with respect to the given basis就稱為v相對(duì)于給定基的表示W(wǎng)e can write the representation as a row or column array of scalars可以把表示寫成列向量a=a1 a2 . anT=94.3 Coordinate System and Frames (Example)v=2v1+3v2-4v3a=2 3 4TNote that this representation is with

9、respect to a particular basis注意上述表示是相對(duì)一個(gè)特定的基而言的For example, in OpenGL we start by representing vectors using the object basis but later the system needs a representation in terms of the camera or eye basis 例如,在OpenGL中剛開(kāi)始是相對(duì)于對(duì)象坐標(biāo)系表示向量的,稍后要把這個(gè)表示變換到照相機(jī)坐標(biāo)系(或者稱為視點(diǎn)坐標(biāo)系)中104.3 Coordinate System and Frames (

10、Coordinate Systems)Which is correct?Both are because vectors have no fixed location都正確,因?yàn)橄蛄繘](méi)有固定位置vv114.3 Coordinate System and Frames (Frames標(biāo)架)A coordinate system is insufficient to represent points坐標(biāo)系是不足于表示點(diǎn)的If we work in an affine space we can add a single point, the origin, to the basis vectors

11、to form a frame如果要在仿射空間中考慮問(wèn)題,那么可以在基向量組中增加一個(gè)點(diǎn)(稱為原點(diǎn)),從而構(gòu)成一個(gè)標(biāo)架(frame)v1v3P0v2124.3 Coordinate System and Frames (Representation in a Frame標(biāo)架中的表示)Frame determined by標(biāo)架是由(P0, v1, v2, v3)確定的Within this frame, every vector can be written as在這個(gè)標(biāo)架中,每個(gè)向量可以表示為 v=a1v1+ a2v2 +.+anvnEvery point can be written as每

12、個(gè)點(diǎn)可以表示為 P = P0 + b1v1+ b2v2 +.+bnvn134.3 Coordinate System and Frames (Confusing Points and Vectors點(diǎn)與向量的混淆問(wèn)題)Consider the point and the vector考慮點(diǎn)與向量 P = P0 + b1v1+ b2v2 +.+bnvn v=a1v1+ a2v2 +.+anvnThey appear to have the similar representations它們看起來(lái)具有相似的表示:p=b1 b2 b3 v=a1 a2 a3which confuses the poi

13、nt with the vectorA vector has no position這導(dǎo)致點(diǎn)與向量很容易混淆在一起vpvVector can be placed anywherepoint: fixed144.3.4 Homogeneous Coordinates (A Single Representation統(tǒng)一的表示)If we define 0P = 0 and 1P =P then we can write v=a1v1+ a2v2 +a3v3 = a1 a2 a3 0 v1 v2 v3 P0 T P = P0 + b1v1+ b2v2 +b3v3= b1 b2 b3 1 v1 v2

14、 v3 P0 TThus we obtain the four-dimensional homogeneous coordinate representation從而得到n+1維齊次坐標(biāo)表示 v = a1 a2 a3 0 T p = b1 b2 b3 1 T點(diǎn)與向量的表示在齊次坐標(biāo)表示下有明顯區(qū)別154.3.4 Homogeneous Coordinates齊次坐標(biāo)-1The homogeneous coordinates form for a three dimensional point x y z is given as三維點(diǎn)齊次坐標(biāo)的一般形式為 p =x y z w T =wx wy

15、wz w TWe return to a three dimensional point (for w0) by可以通過(guò)下述方法給出三維點(diǎn)(當(dāng)w 0): xx/w yy/w zz/w164.3.4 Homogeneous Coordinates齊次坐標(biāo)-2If w=0, the representation is that of a vector當(dāng)w = 0時(shí),表示對(duì)應(yīng)的是一個(gè)向量 p =x y z w T =wx wy wz w TNote that homogeneous coordinates replaces points in three dimensions by lines th

16、rough the origin in four dimensions齊次坐標(biāo)表示中把四維空間中過(guò)原點(diǎn)的條直線對(duì)應(yīng)于三維空間中的一個(gè)點(diǎn)For w=1, the representation of a point is x y z 1174.3.4 Homogeneous Coordinates(Homogeneous Coordinates and Computer Graphics)Homogeneous coordinates are key to all computer graphics systems齊次坐標(biāo)是所有計(jì)算機(jī)圖形系統(tǒng)的關(guān)鍵All standard transformati

17、ons (rotation, translation, scaling) can be implemented with matrix multiplications using 4 x 4 matrices所有標(biāo)準(zhǔn)變換(旋轉(zhuǎn)、平移、放縮)都可以應(yīng)用44階矩陣的乘法實(shí)現(xiàn)Hardware pipeline works with 4 dimensional representations硬件流水線體系可以應(yīng)用四維表示For orthographic viewing, we can maintain w=0 for vectors and w=1 for points對(duì)于正交投影,可以通過(guò)w = 0

18、保證向量,w = 1保證點(diǎn)For perspective we need a perspective division對(duì)于透視投影,需要進(jìn)行特別的處理:透視除法184.3.2 Change of Coordinate Systems變換坐標(biāo)系Consider two representations of a the same vector with respect to two different bases. The representations are考慮同一個(gè)向量相對(duì)于兩個(gè)不同基的表示,假設(shè)表示分別是v=a1v1+ a2v2 +a3v3 = a1 a2 a3 v1 v2 v3 T =b

19、1u1+ b2u2 +b3u3 = b1 b2 b3 u1 u2 u3 Ta=a1 a2 a3 b=b1 b2 b3where194.3.2 Change of Coordinate Systems (Representing second basis in terms of first用第一組基表示第二組基)Each of the basis vectors, u1,u2, u3, are vectors that can be represented in terms of the first basis u1,u2,u3中每個(gè)向量都可以用 第一組表示出來(lái)u1 = g11v1+g12v2+

20、g13v3u2 = g21v1+g22v2+g23v3u3 = g31v1+g32v2+g33v3v204.3.2 Change of Coordinate Systems (Matrix Form矩陣形式)The coefficients define a 3 x 3 matrix所有系數(shù)定義了一個(gè)33階矩陣and the bases can be related by 兩組基就可以如下聯(lián)系see text for numerical examplesa=MTbM =214.3.5 Example Change of Frames改變標(biāo)架We can apply a similar proc

21、ess in homogeneous coordinates to the representations of both points and vectors可以對(duì)同時(shí)表示點(diǎn)與向量的齊次坐標(biāo)進(jìn)行類似的操作Any point or vector can be represented in either frame任何點(diǎn)和向量都可以用它們中的一個(gè)表示出來(lái)We can represent Q0, u1, u2, u3 in terms of P0, v1, v2, v3 下一頁(yè)pptConsider two frames:(P0, v1, v2, v3)(Q0, u1, u2, u3)P0v1v2

22、v3Q0u1u2u3224.3.5 Example Change of Frames (Representing One Frame in Terms of the Other)u1 = g11v1+g12v2+g13v3u2 = g21v1+g22v2+g23v3u3 = g31v1+g32v2+g33v3Q0 = g41v1+g42v2+g43v3 +g44P0Extending what we did with change of bases把基的改變方法推廣可有defining a 4 x 4 matrix由此定義了44階矩陣M =如何用標(biāo)架v來(lái)表示標(biāo)架u標(biāo)架(基)之間的關(guān)系234.3

23、.5 Example Change of Frames (Working with Representations表示的變換-1)Within the two frames any point or vector has a representation of the same form點(diǎn)和向量具有同樣形式a=a1 a2 a3 a4 in the first frame在第一個(gè)標(biāo)架b=b1 b2 b3 b4 in the second frame在第二個(gè)標(biāo)架where a4 = b4 = 1 for points and a4 = b4 = 0 for vectors 244.3.5 Exam

24、ple Change of Frames (Working with Representations表示的變換-2)and表示的變換The matrix M is 4 x 4 and specifies an affine transformation in homogeneous coordinates這里矩陣M是44階,用齊次坐標(biāo)定義一個(gè)仿射變換a = MT b表示(坐標(biāo)點(diǎn)、向量)之間的關(guān)系b = (MT)-1 a254.3 Coordinate System and Frames (Affine Transformations仿射變換)Every linear transformation is equivalent to a change in frames每個(gè)線性變換等價(jià)于一次標(biāo)架改變Every affine transformation preserves lines所有的仿射變換保持共線性However, an affine transformation has only 12 degrees of freedom because 4 of the elements in the matrix are fixed and are a subset of all possibl

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論