• Remix
  • Share
  • New Entry

on 22 Oct 2022
  • 4
  • 209
  • 0
  • 3
  • 233
%if you stare at this pattern for a while you should alternately see
%violet/yellow stripes and then teal/pink stripes
a=1000;
x=linspace(-6*pi,6*pi,a);
[X,Y]=meshgrid(x,x);
X=rescale(sin(cos(pi/4)*X+sin(pi/4)*Y),0,1);
s=[.95 .95;.90 1;1 .8;.9 1;1 .9;.95 1];
for k=1:6
if k==4
X=flipud(X);
end
b(:,:,k)=X*(s(k,2)-s(k,1))+s(k,1);
end
image(b(:,:,4:6).*b(:,:,1:3))
camva(3)
Image
Remix Tree