如何用枢轴点模拟Flash的偏斜?

时间:2014-09-29 08:39:57

标签: algorithm flash image-processing

我必须使用Flash中创建的轴点来模拟偏斜。 我已经准备好了倾斜部分,这是我如何计算倾斜后点的坐标:

function shearPoint(x, y, shearX, shearY)
    return round(x + shearX * y), math.round(y + shearY * x)

如何将枢轴点添加到此计算中? 我可以使用X,Y或使用百分比来提供透视值。

编辑: 添加了视觉表示: (顶部表示与右下方枢轴点倾斜,底部表示与中间轴心点倾斜) enter image description here

EDIT2: 好吧,似乎我原来的'算法'是有缺陷的,因为对于水平倾斜,它不会影响该点的Y值,这是不正确的。

0 个答案:

没有答案