开发者

Mapping trapezoid to rectangle?

开发者 https://www.devze.com 2023-02-07 11:59 出处:网络
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.

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号