找回密码
 注册
搜索
查看: 526|回复: 2

Indepth: iPhone Flip 3D Effect

[复制链接]
发表于 2009-1-17 16:23:35 | 显示全部楼层 |阅读模式
[PERSPECTIVE TRANSFORMATION]

A perspective transformation is one that maps one arbitrary quadrilateral onto another. For example, if you look at a building face-on, the facade appears to be a rectangle; but if you are not directly in front of it but angled to one side, then it appears to be a trapezoid. Perspective transformations are not affine, and worse, they are relatively expensive to compute. But there's a fairly good alternative...

PERSPECTIVE变换不是AFFINE变换, 更糟的是, 其计算成本实现起来代价相对较高.
 楼主| 发表于 2009-1-17 16:29:49 | 显示全部楼层
[BILINEAR TRANSFORMATION]

A bilinear transformation is another 4-point mapping like the perspective mapping. Technically, according to what I've been told, it maps one arbitrary circle onto another arbitrary circle, but I don't really understand how. This is a little hard to picture, but the point is that when the distortion is not very large, a bilinear transformation looks a lot like a perspective transformation -- and it's easier to compute, because there is no division involved.

A bilinear transformation is defined by these two equations:

        x' = a*x + b*y + c*x*y + d       
                y' = e*x + f*y + g*x*y + h

There are eight constants here, parameters that must be supplied to the transformation. They can be computed when given the eight points of the two quadrilaterals, using some matrix math.

在变形扭曲程度不大的时候, BILINEAR变换的效果与PERSPECTIVE变换非常趋近, 并且它很容易计算, 因为其不涉及到除法运算.
点评回复

使用道具 举报

 楼主| 发表于 2009-1-17 16:37:14 | 显示全部楼层
[AFFINE TRANSFORMATION]

An affine transformation is one that preserves parallel lines. Affine transformations include only scaling, shearing, rotating and translating, none of which can alter the ratio of lengths in the way that perspective requires. But not everything is an affine transformation.

AFFINE变换能保持平行线. AFFINE变换包括: translation, rotation(旋转), scaling(放大/放小), shearing. 当然AFFINE变换并不能无所不能及, 比如它就不能像perspective变换那样能改变长度的比例.
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-10-6 19:28 , Processed in 0.070662 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表