Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
581 views
in Technique[技术] by (71.8m points)

graphics - skew matrix algorithm

I'm looking for skew algorithm, just like on photoshop, edit->transform->skew is there any simple matrix which could do that?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Looking at http://www.w3.org/TR/SVG11/coords.html, which talks about SVG, it says:

  • A skew transformation along the x-axis is equivalent to the matrix

alt text

or [1 0 tan(a) 1 0 0], which has the effect of skewing X coordinates by angle a.

  • A skew transformation along the y-axis is equivalent to the matrix

alt text

or [1 tan(a) 0 1 0 0], which has the effect of skewing Y coordinates by angle a.

Hope that helps! :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...