Apple Shake 4 User Manual
Page 820
Advertising
820
Chapter 27
Warping and Morphing Images
Expr
Value
xExpr
float xc=(x-width/2); float yc=(y-height/2);
float r=sqrt(xc*xc+yc*yc); float a=atan2d(yc,xc);
float newA= a+((int)a)%8-4; width/2+r*cosd(newA)
yExpr
float xc=(x-width/2); float yc=(y-height/2);
float r=sqrt(xc*xc+yc*yc); float a=atan2d(yc,xc);
float newA= a+((int)a)%8-4; width/2+r*sind(newA)
Expr
Value
xExpr
float xc=(x-width/2); float yc=(y-height/2);
float r=sqrt(xc*xc+yc*yc); float newr=r*r/200; width/2+
newr*xc/r
yExpr
float xc=(x-width/2); float yc=(y-height/2);
float r=sqrt(xc*xc+yc*yc); float newr=r*r/200;
height/2+ newr*yc/r
Advertising