理解transformation Matrix

1.Every matrix M is associated with a coordinate system. This coordinate system has origin (t0, t1, t2) and vectors (a00,a110,a20), (a01,a11,a21), and (a02,a12,a22) as axes. Matrix M maps the standard coordinate system to the coordinate system with the origin (0, 0, 0) and axes (1, 0, 0), (0, 1, 0), and (0, 0, 1).
直接paste一段关于AcgeMatrix3D的解释:

 

Class AcGeMatrix3d represents an affine transformation of 3D space, including translation. Each matrix M has the form: 

a00 a01 a02 t0
a10 a11 a12 t1
a20 a21 a22 t2

where the matrix A: 

a00 a01 a02
a10 a11 a12
a20 a21 a22

is called the linear part of M. 

Column T: 

t0
t1
t2

is called a translational part of M. 

To get AcGePoint3dpnt transformed by corresponding transformation one has to take the product M x P of the matrix M and point-column P = ( pnt.x, pnt.y, pnt.z, 1.0 ) to the power of T . To get AcGeVector3dvec transformed by corresponding transformation one has to take the product M x V of the matrix M and vector-column V = (vec.x, vec.y, vec.z, 0.0) to the power of T. 

Every matrix M is associated with a coordinate system. This coordinate system has origin (t0, t1, t2) and vectors (a00,a110,a20), (a01,a11,a21), and (a02,a12,a22) as axes. Matrix M maps the standard coordinate system to the coordinate system with the origin (0, 0, 0) and axes (1, 0, 0), (0, 1, 0), and (0, 0, 1).
2. 一些note关于3D数学基础:图形与游戏开发

1) 世界坐标系(translation)->惯性坐标系(rotation)->物体坐标系。还有camera坐标系。
2) 矩阵:矩阵是3D数学的重要基础,它主要用来描述两个坐标系之间的关系,通过定义一种运算而将一个坐标系的向量转换到另一个坐标系中
3) 用基向量(1,0,0),(0,1,0),(0,0,1)乘任意矩阵M,得:矩阵M的每一行都可以理解为转换后的基向量。
4) 旋转坐标系相当于以相反的量旋转物体。
5) 使用4*4矩阵的一个原因就是它能包含平移(translation)。
6) 包含平移的仿射变换,基本思想:将变换的中心点平移到原点,进行线性变换,然后再将中心点平移到原来的位置。 TRT-1

 

转载于:https://www.cnblogs.com/taoxu0903/archive/2011/03/31/2001376.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SVG(Scalable Vector Graphics)中的矩阵变换(Matrix Transformation)是一种通过矩阵操作来改变形状、位置和方向的方法。在SVG中,可以使用矩阵变换来实现平移、缩放、旋转和错切等操作。 矩阵变换在SVG中使用一个3x3的矩阵来描述变换操作。这个矩阵包含六个值,分别是 a、b、c、d、e 和 f。其中,a 和 d 控制缩放,b 和 c 控制错切,e 和 f 控制平移。 下面是一个示例的矩阵变换代码: ```html <svg width="200" height="200"> <rect width="100" height="100" fill="blue"> <animateTransform attributeName="transform" type="matrix" dur="5s" values="1 0 0 1 0 0; 2 0 0 2 50 50; 1 0 0 1 100 100" repeatCount="indefinite" /> </rect> </svg> ``` 在上面的代码中,矩形元素通过 `animateTransform` 元素应用了一个动画变换。`values` 属性指定了三个不同的矩阵变换,分别是初始状态、缩放并平移、以及返回初始状态。这样就实现了一个循环的缩放并平移的动画效果。 除了使用动画元素,你还可以直接在元素的 `transform` 属性中应用矩阵变换。例如,下面的代码将一个矩形元素进行了平移和旋转: ```html <svg width="200" height="200"> <rect width="100" height="100" fill="red" transform="translate(50, 50) rotate(45)" /> </svg> ``` 上面的代码中,`translate(50, 50)` 表示将矩形平移了50个单位,`rotate(45)` 表示将矩形旋转了45度。 希望这能帮助到你理解SVG中的矩阵变换!如果还有其他问题,请随时提问。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值