Multiple settings superscope
I'm trying to make a superscope that changes between a number of different settings (i.e., ring, anchored scope, cross, flying vu, etc.). But I can't figure out the timing. Any help...?
8 posts
csh=sh;
x=if(csh,0,xcode for 1st shape);
y=if(csh,0,ycode for 1st shape);
csh=csh-1;
x=if(csh,x,xcode for 2nd shape);
y=if(csh,y,ycode for 2nd shape);
csh=csh-1;
x=if(csh,x,xcode for 3rd shape);
y=if(csh,y,ycode for 3rd shape);
csh=csh-1;
x=if(csh,x,xcode for 4th shape);
y=if(csh,y,ycode for 4th shape); What happens is this...init {
ip = 0;
sh = 0;
}
frame {
ip = ip+0.01; next=equal(ip,1);
sh = if(next, (sh+1)%4, sh);
ip = if(next,0,ip);
} This will have a value 'ip' that just goes from 0 to 1 and returns to 0 afterwards, and a value 'sh' that will increase every time 'ip' is wrapped around. So if your first shape uses 'ip' to interpolate between x1 and x2, and the second shape uses 'ip' to interpolate between x2 and x3, you'll get a nice morph from x1 to x3, passing through x2.
int:
x=sin(t+i)+v;
y=cos(t+i);
red=cos(tan(t)+x);
green=sin(tan(-t)+y);
blue=cos(tan(x-y));