版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Geometric TransformationsLi GuiqingSouth China University of Technology2Agenda二维几何变换(附录B、C)3D geometric transformations (三维几何变换,附录B、C)裁剪(Chap 2.5)Mathematical representation?3Agenda2D geometric transformations (二维几何变换)Homogeneous coordinates (齐次坐标表示)Basic transformations (基本变换)Composite transformati
2、ons (复合变换)三维变换裁剪42D geometric transformationsTransform 2D objects from world coordinates to screen coordinates (从世界坐标到屏幕坐标)Applications: vector graph, cartoon animation (矢量图形、卡通动画)Common used transformations基本变换:平移、旋转、放缩 其它变换:剪切、对称、复合Ren Decartes拉丁名:Renatus CartesiusDescartes coordinates又称Cartesian
3、coordinates从逻辑、几何、代数发现4规则绝不承认任何事物为真,对于我完全不怀疑的事物才视为真理将问题分成若干个简单部分来处理思想必须从简单到复杂5时常进行彻底的检查,确保没有遗漏任何东西。6Use (n+1)-dimensional vector to represent an nD point (n+1维向量表示n维点)Homogeneous coordinates(齐次坐标) 2D point (2, 3) HC (4, 6, 2) (3, 4.5, 1.5)3D HC coord. (2,3,1) HC(0.2, 0.3, 0.1) HC(20,30,10)2D point (
4、x, y) can be written as homogeneous coord. (X,Y,), where x = X/ , y = Y/ XYP=1 平面Homogeneous coordinates7A space point can have infinite coordinate vectors as (有无穷多齐次坐标)x=X/ y=Y/XYP=1 平面Advantages of HC(齐次坐标)Support unified matrix representation (矩阵变换的统一表示)Capture composite transformations convenien
5、tlyNon linear transformations (3D-perspective transformations)Infinity(可表示无穷大)82D Translation(二维平移)Translating P(x,y) by (tx,ty) leads to P(x, y)XO(x,y)(x,y)YUse HC(齐次坐标): (x, y) (x, y, 1)Rotate P(x, y) counterclockwise surrounding the origin(绕坐标原点按逆时针旋转角) 92D Rotation (二维旋转)XY(x,y)(x,y)Transformati
6、on formula:10All coordinates are scaled by a factorScale (二维放缩)XO(x,y)(x,y)Y其中sx和sy分别为x和y分量的放缩比例 11Shear (剪切变换或错切变换)Shear a point along X-axis (沿x轴方向错切) XY(x, y)(x, y) y remains unchanged, x changes linearly;Line segments parallel to x-axis are still parallel to x-axis after transformation (平行于x轴的线段
7、错切后仍平行于x轴)Line segments are still transformed to line segments (线段线段)12Symmetry (对称变换)XOY(x,y)(-x,y)(-x,-y)(x,-y)关于X轴的对称变换关于Y轴的对称变换关于坐标原点的对称变换13Symmetry(continued)XOYy=x(y,x)(x,y)XOy=-x(x,y)(-y,-x)Y关于直线y=x的对称变换关于直线y=-x的对称变换14Composite transformation (复合二维变换)A complex transform. is composed of transl
8、at., rotat. and scale transform. 先旋转45,x方向放缩2先(非等比例)放缩,再旋转Associative law(结合): (AB)C=A(BC); No commutative law(交换): ABBA15(continued)Commutative law is not satisfied先平移,再旋转先旋转,再平移16(continued)Rigid transformation(刚体变换)The shape of the object is unchanged but the position and orientation may change (
9、形状不变但位置与朝向变化)The composition of translation and rotation transformations is rigid刚体变换17(continued)Affine transformation (仿射变换)Preserve collinear, ratio of length, parallel (保持共线、长度比例、平行)Is the composition of translation, rotation and scale (由旋转、平移、缩放复合得到)仿射变换 Generalization(一些一般情形)18Example (例子)建立A变
10、到B的换矩阵B的朝向转了90度B比A放大了一倍19(3,0)(0, -3)AB20Agenda二维变换三维变换(3D geometric transformation)场景坐标系和造型变换视点坐标系和取景变换投影坐标系和投影变换屏幕坐标系和设备变换裁剪21Why 3D transformations(为何要3D变换)?Rendering a 3D model is similar to the process that we use a camera to take a photo: 3D2D 真实的照相机计算机中的虚拟照相机22三维变换的基本概念场景造型场景坐标系世界坐标系、局部坐标系变换:
11、造型变换放置虚拟照相机坐标系:视点坐标系变换:取景变换23三维变换的基本概念投影(照相、摄影):坐标系:投影坐标系 和窗口坐标系变换:投影变换二维显示坐标系:窗口坐标系、 规格化设备坐标系与 屏幕的物理坐标系变换:设备变换、视窗变换24坐标变换流程图局部坐标系世界坐标系视点坐标系图像坐标系规格化设备坐标系屏幕坐标系造型变换world transformation取景变换View transformation投影变换Projection transform.设备变换Device transform.视窗变换Viewport transform.25三维变换中的各种坐标系图示26场景坐标系和模型变
12、换 几何场景建立于世界坐标系中场景中的具体物体与局部坐标系相联系局部坐标系可以简化物体的定义物体=标准体素,变换造型变换物体从局部坐标系到世界坐标系的变换三维线性和非线性变换273D Geometric transformation: translation (三维模型变换:平移)Move P(x,y,z) to P(x,y,z) by (tx,ty,tz) PTP283D Geometric transformation: scale (三维模型变换:缩放)Scale P(x,y,z) by (sx,sy,sz) to yield P (x,y,z)293D rotation transfo
13、rmationRotate p with angle surrounding x-axisyzPPx303D rotation transformationy-axis (角)zxPPy313D rotation transformation z-axis ()xyPPz P rotates to P by with respect to the axis (P旋转到P) yzPPxRotation surrounding a general axis(绕一般坐标轴旋转) Given axis defined by two points(已知旋转轴): The rotation matrix
14、by composition (复合方式导出变换矩阵) (2)Rotate surrounding z-axis by (绕z轴旋转)Three steps (三步骤)yzxlyzxlyzxl (1)Transform l such that it overlaps with z-axis (作变换让l与z轴重合) (3) Reverse transform. (逆变换使l回原位)Step 1(1) Transform l such that it overlaps with z-axis: can be decomposed three step again (1a) Translate s
15、uch that l passes through the origin (平移) (1b) Rotate surrounding x-axis such that l locate on the ZOX plane (绕x轴旋转) (1c) Rotate around y-axis such that l locate on the ZOX plane (绕y轴旋转)yzxPP(1a) Translation (平移) to originii) Rotate by surrounding X-axis(旋转)yzx 角应当是l在YOZ平面的投影与z轴的夹角。因此: yzxiii) Rotat
16、e by surrounding y-axis (旋转)这个 角应当是l旋转到ZOX平面后与Z轴的夹角。因此: yzxStep 2: Rotate by in terms of z-axis Step 3: Use reverse transformation to derive final transformationWhy the order of reverse transformations is contrary to that of the original transformations?两坐标系之间的变换 平移40YXZYXZ两坐标系之间的变换 41YXZYXZ例子:绕任意轴旋转求绕(1,1,0)(3,3,2)所在直线旋转90度的变换矩阵 42YXZ(1,1,0)(3,3,2)求绕(1,1,0)(3,3,2)所在直线旋转90度的变换矩阵 平移43YXZ(0,0,0)(2,2,2)绕
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年广西壮族自治区崇左市初中学业水平考试模拟数学卷附答案
- 0-3岁宝宝情商自测题(家长版·通俗易懂)
- 地暖配套保温施工方案
- 合规转利润:降本增效全指南(2026)《GBT 39191-2020不锈钢和耐热钢件热处理》
- 2026年浙江省人教版初中物理八年级下册第5章热学习题
- 2026年浙江省人教版初中数学七年级上册第3单元方程练习题
- 湖南省长沙市岳麓实验中学2026-2027学年高二上学期开学考试生物试卷(含答案)
- 湖南省部分学校2027届高三上学期9月联考生物试卷(含答案)
- 《商务英语口语实训》-Unit 8
- 康复医学文献分享会
- 2026秋小学湘美版美术四年级上册(新教材)教学计划附进度表
- 2026青岛海洋发展集团有限公司招聘6人考试备考题库及答案详解
- 新教科版科学六年级上册第1课《健康成长的信息》教学课件
- 2026年疾病预防控制中心招聘考试笔试试题含答案
- 2026冶炼厂面试题及答案
- 【新教材】2026年秋人教版(PEP)五年级上册英语全册教案(含教学计划)
- (2026年秋)人教版三年级上册数学教案
- 加气站应急预案
- 2026人教版五年级数学上册《有趣的密铺》课件
- 2026苏教版五年级数学上册第六单元第3课《3的倍数的特征》课件
- 2026秋教科版(新教材)小学科学六年级上册(全册)分层作业及答案附目录p149
评论
0/150
提交评论