ct4201/ec4215: computer graphics transformation€¦ · ct4201/ec4215: computer graphics...
TRANSCRIPT
![Page 1: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/1.jpg)
CT4201/EC4215: Computer Graphics
TransformationBOCHANG MOON
![Page 2: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/2.jpg)
Transformation• Fundamental operation to arrange objects in a 3D scene
Object 3D scene
![Page 3: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/3.jpg)
Transformation: Scaling• Change length along the coordinate axes
◦ 𝑠𝑐𝑎𝑙𝑒 𝑠 , 𝑠𝑠 00 𝑠
◦𝑠 00 𝑠
𝑥𝑦
𝑠 𝑥𝑠 𝑦
x
y
x
y
0.5 00 0.5
![Page 4: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/4.jpg)
Transformation: Scaling• Change length along the coordinate axes
◦ 𝑠𝑐𝑎𝑙𝑒 𝑠 , 𝑠𝑠 00 𝑠
◦𝑠 00 𝑠
𝑥𝑦
𝑠 𝑥𝑠 𝑦
x
y
x
y
0.5 00 2.0
![Page 5: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/5.jpg)
Transformation: Shearing• Push objects sideways along horizontal or vertical direction◦ 𝑠ℎ𝑒𝑎𝑟 𝑠 1 𝑠
0 1◦ 𝑠ℎ𝑒𝑎𝑟 𝑠 1 0
𝑠 1
x
y
x
y
1 10 1
![Page 6: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/6.jpg)
Transformation: Shearing• Push objects sideways along horizontal or vertical direction◦ 𝑠ℎ𝑒𝑎𝑟 𝑠 1 𝑠
0 1◦ 𝑠ℎ𝑒𝑎𝑟 𝑠 1 0
𝑠 1
x
y
x
y
1 01 1
![Page 7: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/7.jpg)
Transformation: Rotation• Rotate objects counterclockwise◦ 𝑟𝑜𝑡𝑎𝑡𝑒 𝜃 𝑐𝑜𝑠𝜃 𝑠𝑖𝑛𝜃
𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃
x
y
x
y
𝑐𝑜𝑠𝜋4 𝑠𝑖𝑛
𝜋4
𝑠𝑖𝑛𝜋4 𝑐𝑜𝑠
𝜋4
45 degrees
![Page 8: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/8.jpg)
Transformation: Rotation• Rotate objects counterclockwise◦ 𝑟𝑜𝑡𝑎𝑡𝑒 𝜃 𝑐𝑜𝑠𝜃 𝑠𝑖𝑛𝜃
𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃
x
y
x
y
𝑐𝑜𝑠𝜋
4 𝑠𝑖𝑛𝜋
4𝑠𝑖𝑛
𝜋4 𝑐𝑜𝑠
𝜋4
‐45 degrees
![Page 9: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/9.jpg)
Transformation: Reflection• Reflect objects across either of the coordinate axes◦ 𝑟𝑒𝑓𝑙𝑒𝑐𝑡_𝑦 1 0
0 1
x
y
x
y
![Page 10: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/10.jpg)
Transformation: Reflection• Reflect objects across either of the coordinate axes◦ 𝑟𝑒𝑓𝑙𝑒𝑐𝑡_𝑥 1 0
0 1
x
y
x
y
![Page 11: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/11.jpg)
Transformation: Composition• Apply more than one transformation to an object
• e.g. apply a scale S, and then a rotation R◦
𝑥𝑦 𝑅𝑆
𝑥𝑦
x
y
x
y
![Page 12: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/12.jpg)
Transformation: Composition• Apply more than one transformation to an object
• e.g. apply a scale S, and then a rotation R◦
𝑥𝑦 𝑆
𝑥𝑦
x
y
x
y
![Page 13: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/13.jpg)
Transformation: Composition• Apply more than one transformation to an object
• e.g. apply a scale S, and then a rotation R◦
𝑥𝑦 𝑅
𝑥𝑦
x
y
x
y
![Page 14: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/14.jpg)
Inverse Transformation• Your transformation◦ 𝑥 𝑅𝑆𝑥 𝑇𝑥
• Undo your transformation◦ 𝑥 𝑇 𝑥
x
y
x
y
![Page 15: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/15.jpg)
Inverse Transformation• Your transformation◦ 𝑥 𝑅𝑆𝑥 𝑇𝑥
• Undo your transformation◦ 𝑥 𝑇 𝑥 𝑅𝑆 𝑥 𝑆 𝑅 𝑥
x
y
x
y
![Page 16: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/16.jpg)
Inverse Transformation• Your transformation◦ 𝑥 𝑅𝑆𝑥 𝑇𝑥
• Undo your transformation◦ 𝑥 𝑇 𝑥 𝑅𝑆 𝑥 𝑆 𝑅 𝑥
x
y
x
y
𝑅
![Page 17: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/17.jpg)
Inverse Transformation• Your transformation◦ 𝑥 𝑅𝑆𝑥 𝑇𝑥
• Undo your transformation◦ 𝑥 𝑇 𝑥 𝑅𝑆 𝑥 𝑆 𝑅 𝑥
x
y
x
y
𝑆
![Page 18: CT4201/EC4215: Computer Graphics Transformation€¦ · CT4201/EC4215: Computer Graphics Transformation BOCHANGMOON. Transformation • Fundamental operation to arrange objects in](https://reader033.vdocuments.site/reader033/viewer/2022042318/5f06efca7e708231d41a7a26/html5/thumbnails/18.jpg)
Inverse Matrix• M = 2 x 2 matrix
◦ 𝑀 𝑀 𝑀𝑀 𝑀
◦ 𝑀 𝑀 𝑀𝑀 𝑀