Search the Community
Showing results for tags 'squeeze'.
-
In a recent posting, @MaximusNZhad been creating panoramas, but had found that the upper and lower parts of the image were compressed with respect to the more central parts. He posted a message in my thread on Wrapping a label round a bottle since this also involved such stretching and squeezing. I posed a temporary solution to his/her problem, but I present here a more general solution. This is based on the S-curve, familiar to those using the Curves tool. The default shape for the curve is a straight line between the origin and the (w, h) position at the top right. The parameters of the macro will distort this linear relationship. I will elaborate on the mathematical aspects in a later posing in this thread. Consider a simple grid: By varying a parameter a, the image can be distorted horizontally. Values of a larger than 0.5 will stretch the left and right whilst compressing the centre; values less than half will stretch the centre whilst stretching the left and right. See the image below: By varying a parameter b, the image can be distorted vertically. Values of b larger than 0.5 will stretch the top and bottom whilst compressing the centre; values less than half will stretch the centre whilst stretching the top and bottom. See the image below: Here is the macro as a single macro and as a library: S-curve.afmacro S-curve.afmacros John