*

\ n by n frames
\ memory 5 saves the index of working frame
0 5 ! : i 5 @ dup 1 + 5 ! ;
: n 4 ; \ n by n frames are shown
: /mod ( i n -- ir iq ) 2dup / floor push mod floor pop ;
\ paste pic at next frame on pic0 as pic1
: | ( pic0 pic -- pic1 ) i n /mod n 1 - swap -
y n * floor = swap ( pic0 pic iq=iy ir )
x n * floor = and ( pic0 pic iq=iy&ir=ix ) * + ;
: x x n * 1 mod ; : y y n * 1 mod ; 0
: x' x .5 - ; : y' y .5 - ;
x .5 < | x .3 > | y .3 < | y .8 > |
x y + 1. < | x y - .0 < | x y + 1. > | x y - .0 > |
x y * .1 < | x y / 1.5 < | x' abs | x' abs .1 < |
y' abs | y' abs .3 > | x' y' * .04 > | x' y' / .6 < |

Based on: n by n frames - 陳爽


comments powered by Disqus