Processing Forum
int
w=256,r=16,i,t;
void
draw
(){
for
(i=0;i<w*w;i++)
set
(i%w,i/w,2*
noise
(i%w/r,i/w/r)>1?-1:-w<<(
dist
(
mouseX
/r,
mouseY
/r,i%w/r,i/w/r)<3?0:r));
PImage I; int i,x,y,w=900,h=450; void setup (){ size (w,h);I= loadImage ( "m.jpg" );} |
void draw (){ for (i=0;i++<w*h;) set ((x=i%w)^ mouseX ,(y=i/w)^ mouseY ,I. get (x,y));} |