Download the contents of: http://www.math.udel.edu/~driscoll/SC/ use scgui and name the polygon as "polygon" and the map as "map". Then copypaste the following to Matlab. M=500; p=0.9; l=linspace(-1,1,M); [X,Y]=meshgrid(l,l); Z=X+1i*Y; aper=ceil(max(0,1-abs(Z))); Z=Z.*aper; W=map(Z); W=(W+4+4i)/8; N=800; A=zeros(N); W=round(W*(N-1)); w1=real(W);w2=imag(W); B=imread('chess.tif'); [C,col] = rgb2ind(B,1000); [n,m]=size(C); %C=double(C); %Cmin=min(min(C));Cmax=max(max(C)); nn=min(n,m); z1=real(Z);z2=imag(Z); z1=round(nn/2+nn/2*p*z1);z2=round(nn/2+nn/2*p*z2); R=zeros(N); %Aper=zeros(n,m); Aper=0*C; for k=1:M for j=1:M Aper(z1(k,j),z2(k,j))=1; R(w1(k,j),w2(k,j))=C(z1(k,j),z2(k,j)); end end CC=C.*Aper; R=uint8(R); %Crand0=round(rand(n,m)); %Crand=round((1-Crand0)*Cmin+Crand0*Cmax); %CC=(1-Aper).*Crand+C.*Aper; %figure %image(R) %colormap(col) %figure %image(CC);colormap(col) subplot(1,2,1) image(CC);colormap(col) subplot(1,2,2) image(R),colormap(col)