




版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院2D Geometric Transformations1中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Introduction to TransformationsTransformation changes an objects:Position (translation)Size (scaling)Orientation (rotation)Shapes (shear)We will introduce first in 2D or (x,y), build intuitionLater, talk about 3D and 4D?Transform object by applying
2、sequence of matrix multiplications to object vertices2中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Why Matrices?All transformations can be performed using matrix/vector multiplicationAllows pre-multiplication of all matricesNote: point (x,y) needs to be represented as (x,y,1), also called Homogeneous coordinates(齊次坐標(biāo))3中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Poi
3、nt RepresentationWe use a column matrix (2x1 matrix) to represent a 2D pointGeneral form of transformation of a point (x,y) to (x,y) can be written as:or4中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院TranslationTo reposition a point along a straight lineGiven point (x,y) and translation distance (tx, ty)The new point: (x,y)x=x + txy=
4、y + ty(x,y)(x,y)orwhere5中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院3x3 2D Translation Matrixuse 3x1 vectorNote: it es a matrix-vector multiplication6中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Translation of ObjectsHow to translate an object with multiple vertices?Translate individualvertices 7中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院2D RotationDefault rotation center is origin (0,0)q 0 : Rot
5、ate counter clockwise Rotate about the origin by q(x, y)How to compute (x, y) ?fx = r cos () y = r sin ()rx = r cos ( +) y = r sin ( +)9中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Rotation(x,y) (x,y) qfrx = x cos(q) y sin(q) y = y cos(q) + x sin(q) Matrix form?3 x 3? Using trig identities10中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院3x3 2D Rotation Matrix(x,y) (x,
6、y) qfr11中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院RotationHow to rotate an object with multiple vertices? Rotate individualVertices q12中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院2D ScalingScale: Alter object size by scaling factor (sx, sy). i.ex = x . Sx y = y . Sy (1,1)(2,2)Sx = 2, Sy = 2 (2,2)(4,4)13中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院3x3 2D Scaling Matrix14中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Shearing(錯(cuò)切)Y c
7、oordinates are unaffected, but x cordinates are translated linearly with yThat is:y = y x = x + y * h h is fraction of y to be added to x15Inverse transformations(逆變換)Inverse translation matrixTwo-Dimensional translation matrixTwo-Dimensional translation matrix中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Arbitrary Rotatio
8、n Center(任意旋轉(zhuǎn)中心)To rotate about arbitrary point P = (Px, Py) by :Translate object by T(-Px, -Py) so that P coincides with originRotate the object by R()Translate object back: T(Px, Py)In matrix form: T(Px,Py) R() T(-Px,-Py) * PSimilar for arbitrary scaling anchor, 17中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Composing Transformati
9、onComposing transformation applying several transforms in succession to form one overall transformationExample:M1 X M2 X M3 X Pwhere M1, M2, M3 are transform matrices applied to PBe careful with the orderFor example:Translate by (5,0) then rotate 60 degrees is NOT same asRotate by 60 degrees then tr
10、anslate by (5,0)18Matrix Concatenation PropertiesAssociative propertiesTransformation is not commutative (CopyCD!)Order of transformation may affect transformation position中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院19Two-dimensional composite transformation (1)Composite transformationA sequence of transformationsCalculate composit
11、e transformation matrix rather than applying individual transformationsComposite two-dimensional translationsApply two successive translations, T1 and T2Composite transformation matrix in coordinate form中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Two-dimensional composite transformation (2)Composite two-dimensional rotationsTwo suc
12、cessive rotations, R1 and R2 into a point PMultiply two rotation matrices to get composite transformation matrixComposite two-dimensional scaling中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Two-dimensional composite transformation (3)General two-dimensional Pivot-point rotationGraphics package provide only origin rotationPerform a t
13、ranslate-rotate-translate sequenceTranslate the object to move pivot-point position to originRotate the objectTranslate the object back to the original positionComposite matrix in coordinates form中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Two-dimensional composite transformation (4)Example of pivot-point rotationTwo-dim
14、ensional composite transformation (5)General two-dimensional Fixed-point scalingPerform a translate-scaling-translate sequenceTranslate the object to move fixed-point position to originRotate the objectUse inverse of translation in step 1 to return the object back to the original positionComposite m
15、atrix in coordinates form中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Two-dimensional composite transformation (6)Example of fixed-point scaling中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Two-dimensional composite transformation (7)General two-dimensional scaling directionsPerform a rotate-scaling-rotate sequenceComposite matrix in coordinates form中國(guó)地質(zhì)大學(xué)
16、計(jì)算機(jī)學(xué)院Other two-dimensional transformation (1)Reflectionimage generated relative to an axis of reflectionReflection about the x-axisReflection about the y-axisReflection about the z-axis中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Other two-dimensional transformation (2)Reflection with axis y=x (diagonal)Other two-dimensional transfo
17、rmation (3)ShearDistorts the shape of an objectShape appears as if the object were composed of internal layers that had been caused to slide over each otherX-axis shear, where shx is the shear parameterX-axis shear with other reference line中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Other two-dimensional transformation (4)Y-axis sh
18、ear with other reference line中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院A unit square (a) is turned into a shifted parallelogram (b) with parameter values shy = 0.5 and xref = 1 in the y -direction shearing transformation Transformation between two-dimensional coordinate systemsCoordinate transfer from one reference frame to anoth
19、er(坐標(biāo)系之間轉(zhuǎn)換)StepsTranslate so that origin (x0,y0) of the xy system is moved to the origin of (0,0) of the xy systemRotate the x axis onto the x axisExample: Reference a Cartesian xy system specified with coordinate origin (x0,y0) and orientation angle in Cartesian xy systemMatrix transformation of the translation and rotationComposite matrix of the transformation中國(guó)地質(zhì)大學(xué)計(jì)算機(jī)學(xué)院Transformation between two-di
溫馨提示
- 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ù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 學(xué)校教室環(huán)境設(shè)計(jì)與學(xué)生健康
- 優(yōu)化采購(gòu)流程與供應(yīng)商管理計(jì)劃
- 軟件企業(yè)網(wǎng)絡(luò)安全風(fēng)險(xiǎn)評(píng)估計(jì)劃
- 大學(xué)生就業(yè)與職業(yè)規(guī)劃
- 教師數(shù)字化教學(xué)能力提升計(jì)劃
- 如何利用科技手段輔助家庭教育培養(yǎng)社交能力
- 倉(cāng)庫(kù)商品品質(zhì)管理計(jì)劃
- 大數(shù)據(jù)時(shí)代的市場(chǎng)分析與策略制定
- 創(chuàng)新驅(qū)動(dòng)的職教實(shí)訓(xùn)室建設(shè)策略
- 孕嬰行業(yè)安全知識(shí)的普及計(jì)劃
- 炎德·英才大聯(lián)考長(zhǎng)郡中學(xué)2025屆高三3月月考試卷(七)英語(yǔ)試卷(含答案詳解)
- 護(hù)理查房實(shí)踐報(bào)告
- 2025年醫(yī)學(xué)類單招試題及答案
- 《有趣的拓印》游戲課件
- 2025年河南鄭州航空港經(jīng)濟(jì)綜合實(shí)驗(yàn)區(qū)招考高頻重點(diǎn)模擬試卷提升(共500題附帶答案詳解)
- 治療腦卒中的藥物
- 2025年超長(zhǎng)期特別國(guó)債“兩新”投向領(lǐng)域分析
- 滬教版(五四學(xué)制)(2024)六年級(jí)下冊(cè)單詞表+默寫單
- 母乳喂養(yǎng)護(hù)理小講課
- 2025年八省聯(lián)考物理試卷答案解析版(陜西、山西、寧夏、青海)
- 采購(gòu)合同風(fēng)險(xiǎn)分析與控制要點(diǎn)3篇
評(píng)論
0/150
提交評(píng)論