Mapping trapezoid to rectangle?
Ho开发者_开发百科w can I map a trapezoid to a rectangle? Do you have any AS3.0 code about mapping? Or a formula for mapping?
not quite sure what you mean by mapping.
in case it might help, a homography ( http://en.nicoptere.net/?p=59 ) allows you to map a quadrilateral to another quadrilateral.
if you want to perform a texture extraction, a (much) faster way to do that is available here: http://wonderfl.net/c/vbla
The trick is to break up the rectangle into triangles, the more triangles you have the smoother the transform looks.
Example: http://www.blackcj.com/blog/2009/06/24/image-distortion-and-tapering-in-actionscript/
精彩评论