资源描述
单击此处编辑母版标题样式,单击此处编辑母版文本样式,第二级,第三级,第四级,第五级,*,Rotate transformation about arbitrary point,Suppose the point is then the transformation can be composed by some fundamental transformations,Translation(T),Rotation(R),Inverse translation,T=T,-1,R T,Cont.,Scaling about arbitrary point,Reference point:,fixup point before and after scaling,Composition of translate,scale about origin,and inverse translate transformations,Cont.,Namely:,Symmetry about arbitrary line,T,R,S,4.2 window-to-viewport transformation,World Domain(,用户域WD,),指程序员用来定义草图的整个自然空间.,Window(,窗口区W,),在用户坐标系(世界坐标系WC)中预先选,定的将产生图形显示的区域称为窗口.,World-coordinate system(,用户坐标系WC,),世界坐标系,右手直角坐标系,Related concepts,Cont.,Screen Domain(,屏幕域SD,),设备输图形的最大区域,是有限的整数域.,Viewport(,视图区V,),在显示器坐标系中规定的显示图形的区域称为视(图)区.,Screen coordinates,(normalized)device coordinates,device coordinates:addressing by pixels,NDC:-1,1-a,a,窗口的取景器作用,Window as a viewfinder,利用窗口尺寸变化改变显示图形的大小,选窗口,的视见变换,选窗口,的视见变换,Cont.,视见变换将用户坐标系中窗口内的图形变换到显示器中的视见区中产生显示.,Window-to-Viewport transformation,window,Wxl,Wxr,Wyb,Wyt,P(x,y),Vxl,Vxr,viewport,Vyb,Vyt,P(x,y),Cont.,window,Wxl,Wxr,Wyb,Wyt,P(x,y),Vxl,Vxr,viewport,Vyb,Vyt,P(x,y),Cont.,transform matrix,窗口,Wxl,Wxr,Wyb,Wyt,Wxl,Wxr,Wyb,Wyt,-,-,Vxl,Vxr,Vyb,Vyt,-,-,Vxl,Vxr,vyb,Vyt,Cont.,Vxl,Vxr,Vyb,Vyt,NDC-to-DC transformation,NDC:-1,1-a,a,DC:0,M-10,N-1,Considering its discrete feature:,-0.5,M-1.5-0.5,N-1.5,The same linear transformation as the W-to-V transformation,Whereas:,Flow chart of 2D view,WC,世界坐标系内的变换,NDC,规格化坐标系到设备坐标系的变换,对窗口区进行裁剪,WC,DC,设备输出,二维图形显示流程,窗口到视图区的规格化变换,WC,Exercises,Exercise 4.1,Exercise 4.2,Exercise 4.3,4.3 3D transformations,Translate(平移)transformations,Rotate(旋转)transformations,Scale(缩放)transformations,Reflect(反射)transformations,Shear(错切)transformations,Composition(复合)of 2D transformations,与二维平移变换类似地使用齐次坐标表示为:,记为:,其中,Translate transformation,Translate transformation,Remarked:,Whereas:,Translate,记为:,Scale transformation,About origin,Cont.,About arbitrary point,The arbitrary reference point is:,Cont.,About arbitrary point,translate,scale about origin,inverse translate,Consists of:,The arbitrary reference point is:,Cont.,则变换矩阵为:,Parameters:rotate axis,rotate angle,二维旋转变换是三维空间中绕Z轴的旋转,记为:,X,Y,Z,Rotate transformation,Rotate about X axis,Equally with changing the coordinate system x,y,z to the coordinate system y,z,x.,Y,Z,X,X,Y,Z,Rotate about Y axis,Changing system x,y,z to system z,x,y,Z,X,Y,X,Y,Z,?:about arbitrary line,是关于某直线或平面进行的,关于某个轴进行的反射变换等同于关于该轴做,180,度的旋转变换,For instance:about Z axis,Reflect transformation,?:about arbitrary symmetry axis,Cont.,当反射平面是坐标平面时,等同于进行左、右手坐标系的互换,相应变换矩阵是把第三维坐标值取反,For instance:about XOY plane,?About arbitrary symmetry plane,Cont.,关于任意直线(或平面)的反射可以分解为平移、旋转(使得指定的反射直线或平面与某坐标轴或平面重合)和关于坐标直线(或平面)的反射。,Shear transformations,Dependence axis:corresponding coordinate is remained,Direction axis:corresponding coordinate is changed linearly,Representations:,变换的一般表达式是:,Shear transformations,Two methods of transformation,Coordinate system fixed,Graphics changed,Graphics fixed,Coordinate system changed,new coordinate system is saw as a graphics and transformed to overlap with the original coordinate system,Transforming coordinate system,Two means:,Define the new coordinate system directly,Define a vector in y direction of the new coordinate system,Cont.,Define a new system:composition of transformations,(x0,y0),(1)translate:T(-x0,-y0),(2)rotate:R(-,),(3)scale,(4)composition of above transformations(notice the sequence),Cont.,The matrix is:,Cont.,Define a vector in y direction of new system:,Y axis is:,(x0,y0),(x1,y1),X axis is:,Transformation is:,Contrast,(x0,y0),(x0,y0),(x1,y1),VS.,
展开阅读全文