How do I compete the transformation matrix needed to transform a rectangle into a trapezium?

Posted by Rich Bradshaw on Stack Overflow See other posts from Stack Overflow or by Rich Bradshaw
Published on 2010-03-20T17:47:26Z Indexed on 2010/03/20 17:51 UTC
Read the original article Hit count: 318

Filed under:
|

I'm playing around with css transforms and the equivalent filters in IE, and want to simulate perspective by transforming a 2d rectangle into a trapezium.

Specifically, I want the right hand side of the rectangle to stay the same height, and the left hand side to be say 80% of the height, so that the mid points of both sides are horizontally in line with each other.

I'm familiar with matrix algebra, but can't think how to determine what matrix will do that.

© Stack Overflow or respective owner

Related posts about matrix

Related posts about perspective