仿射变换矩阵介绍

平移

translate tx ty tz

1 0 0 t x 0 1 0 t y 0 0 1 t z 0 0 0 1

缩放

scale kx ky kz

k x 0 0 0 0 k y 0 0 0 0 k z 0 0 0 0 1

旋转

绕任意轴(过原点)旋转(注意要把轴向量归一化,不然会在“点在轴上”这个情况下出问题)
rotate x y z d

( 1 c o s ( d ) ) x x + c o s ( d ) ( 1 c o s ( d ) ) x y s i n ( d ) z ( 1 c o s ( d ) ) x z + s i n ( d ) y 0 ( 1 c o s ( d ) ) y x + s i n ( d ) z ( 1 c o s ( d ) ) y y + c o s ( d ) ( 1 c o s ( d ) ) y z s i n ( d ) x 0 ( 1 c o s ( d ) ) z x s i n ( d ) y ( 1 c o s ( d ) ) z y + s i n ( d ) x ( 1 c o s ( d ) ) z z + c o s ( d ) 0 0 0 0 1

猜你喜欢

转载自blog.csdn.net/qq_34921856/article/details/80648570
今日推荐