斜矩阵算法 [英] skew matrix algorithm
问题描述
我在寻找歪斜的算法,就像在Photoshop中,编辑 - >互感器>歪斜 有没有简单的矩阵,能做到这一点?
I'm looking for skew algorithm, just like on photoshop, edit->transform->skew is there any simple matrix which could do that?
我到目前为止看到的是基本的斜矩阵(剪切),但其缺乏控制点,不喜欢上的Photoshop其中至少有4点在矩形的每个角落,我们可以自由地移动每个控制点。
what I've seen so far was basic skew matrix (shear) but its lack of control point, doesn't like on photoshop which have at least 4 points on each corner of rectangle and we can move each control point freely.
我要实现它改造一个平面。
I need to implement it to transform a plane.
推荐答案
看着 HTTP://www.w3 .ORG / TR / SVG11 / coords.html ,该谈的SVG,它说:
Looking at http://www.w3.org/TR/SVG11/coords.html, which talks about SVG, it says:
- 沿x轴线A倾斜转换相当于矩阵
或[1 0黄褐色(一)1 0 0],其具有倾斜X的效果的坐标由角度α
or [1 0 tan(a) 1 0 0], which has the effect of skewing X coordinates by angle a.
- 沿y轴线A倾斜转换相当于矩阵
或[1黄褐色(一个)0 1 0 0],其具有倾斜的ÿ由角坐标的影响的
or [1 tan(a) 0 1 0 0], which has the effect of skewing Y coordinates by angle a.
希望帮助! :)
这篇关于斜矩阵算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!