Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
565 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 Answer

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! :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...