View Single Post
11-01-2018, 04:11 AM   #11
wwwmaze
Human being with feelings

Join Date: Oct 2009
Posts: 115

Quote:
 Originally Posted by sonicowl EDIT: Yes, after testing a bit, it is possible to get somewhat half circle kaleidoscope by adding Justin's radial transform. Probably below script could be modified to get proper 360° circle in the center?
Ah yes using circular segments could work, I will have a look later.

Meanwhile I modified the preset to specify window width+height. Set num tiles x/y to 1 and angle to 0° if you are interested in what that means.

Code:
```//@param1:x 'window x' 0.25 0 1 0.5 0.001
//@param2:y 'window y' 0.25 0 1 0.5 0.001
//@param3:w 'window w' 0.5 0 1 0.5 0.001
//@param4:h 'window h' 0.5 0 1 0.5 0.001

//@param6:numX 'num tiles x' 4 1 100 50 1
//@param7:numY 'num tiles y' 4 1 100 50 1
//@param9:ang 'angle' 45 0 360 180 1
//@param11:bg 'bg' 0 0 1 0.5 0.01
tileW=(project_w/numX)|0; tileH=(project_h/numY)|0;

gfx_set(bg,bg,bg);
gfx_fillrect(0,0,project_w,project_h);

input_info(0,inW,inH);
gfx_dest = fs = gfx_img_resize(fs, project_w, project_h);
gfx_fillrect(0,0,project_w,project_h);
gfx_rotoblit(0,\$pi/180*ang,   0,0,tileW,tileH,    (x*inW)|0, (y*inH)|0, (w*inW)|0, (h*inH)|0);

gfx_dest=-1;
i=0;
loop(numX,
curXd=tileW*i;
i%2 ? (
curWd=tileW;
curXs=tileW;
curWs=-tileW;
):(
curWd=tileW+1;
curXs=0;
curWs=tileW;
);
j=0;
loop(numY,
curYd=tileH*j;
j%2 ? (
curHd=tileH;
curYs=tileH;
curHs=-tileH;
):(
curHd=tileH+1;
curYs=0;
curHs=tileH;
);
gfx_blit(fs,0,  curXd,curYd,curWd,curHd,   curXs,curYs,curWs,curHs);
j+=1;
);
i+=1;
);```

Last edited by wwwmaze; 11-01-2018 at 04:19 AM.