#!/usr/bin/env gmic # File : rotozoom.gmic # Author : David Tschumperle # Entrypoint when run from CLI: go r2dx 200%,1 =>[^] Rotozoom e[] "" animate 70 # Main function go : v 0 nbf=70 sp colorful repeat $nbf { e[] "\r > Frame "{1+$>}"/"$nbf 240,240,1,3," const boundary = 2; const interpolation = 1; const t = "$>/$nbf"; const pit2 = 2*pi*t; dx = 4*w#0*t; dy = 3*h#0*t; zoom = 0.35 + 0.3*sin(pit2); angle = pit2*180/pi; rot = rot(angleĀ°)/zoom; P = [ w#0,h#0 ]/2 + [ dx,dy ] + rot*[ x - w/2,y -h/2 ]; i(#0,P)" } rm[0] # End of file.