开发者

Ripple Image Distortions Effect UV translation algorithm, in PHP or C-style language, similar to the one in The GIMP

I've been working on a UV to XY coordinate space translation algorithm for applying image distortions based on simple equations, in PHP.

My algorithm uses four point bi linear interpolation.

And calculates the position in the original XY space for every point in the UV space.

I've tried to get a Ripple effect like the one seen in The GIMP. I used the translations x = u+2*sin(u/5), and y = v+2*sin(v/5).

however instead of a smooth ripple effect as seen when using the gimp, I get a highly blurred effect (mus开发者_如何转开发t more than I expected to get).

Can any one point me towards a better way to achieve this effect.

Or free easy to follow preexisting algorithms in either PHP or another language with C-like syntax.

So far all I've been able to with with Google is ready made algorithms that are part of a library that for sale.


I've tried to get a Ripple effect like the one seen in The GIMP. I used the translations x = u+2*sin(u/5), and y = v+2*sin(v/5).

I needed to use x = u+2*sin(v/5), and y = v+2*sin(u/5) to get the expected effect.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜