-- refractor -- modified for Pixopedia 24 by Sinisa Petric, 2008 image_OUT = 0 image_INP = 1 patternsize = 20; function val(n,minv,maxv) return minv + (n/255)*(maxv-minv); end; function hypot(xx,yy) return math.sqrt((xx*xx)+(yy*yy)) end M = hypot(vp24_width, vp24_height) / 2 for y = 0, vp24_height-1 do for x = 0, vp24_width-1 do d1 = x + math.mod(x,val(patternsize,0,M/2)) d2 = y + math.mod(y,val(patternsize,0,M/2)) if d1 >= vp24_width-1 then d1 = vp24_width-1 end if d2 >= vp24_height-1 then d2 = vp24_height-1 end r,g,b = fp24_getImageRGB(image_INP, d1,d2) fp24_setImageRGB(image_OUT, x,y,r,g,b) end fp24_showProgress(y, vp24_height) end