%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Programme aufrufen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% h = 0.17; % Gitterweite K = RelevantIndices(h); [I,J] = InOutIndices(K,h); [IJ,EJ] = NearestInner(I,J,K,h); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Visualisierung %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% disp('Vergroessern Sie Figur 1 auf full screen') disp('Danach wiederholt links clicken') figure(1) clf reset hold on axis equal n = ceil(1/h); t = linspace(0,pi/2); fill([0 1 cos(t) 0 0],[0 0 sin(t) 1 0],[1 .7 .7]) for i=-2:n+2 plot([-2*h,(n+2)*h],[0 0]+i*h) plot([0 0]+i*h,[-2*h,(n+2)*h]) end plot([0 1 cos(t) 0 0],[0 0 sin(t) 1 0],'r','LineWidth',2) for i = 1:length(K) k = ([real(K(i)) imag(K(i))]+2)*h; plot(k(1),k(2),'bo','MarkerSize',8,'MarkerFaceColor','w') end for i = 1:length(I) k = ([real(I(i)) imag(I(i))]+2)*h; plot(k(1),k(2),'bo','MarkerSize',8,'MarkerFaceColor','g') end for j = 1:length(J) k = ([real(J(j)) imag(J(j))]+2)*h; plot(k(1),k(2),'bo','MarkerSize',8,'MarkerFaceColor','r') end axis ij waitforbuttonpress d = 2+2.00001*sqrt(-1); for j=1:length(J) h1 = plot(h*(J(j)+d),'ro','MarkerSize',25,'MarkerFaceColor','w'); h2 = plot(h*(IJ(j,:)+d),'bo','MarkerSize',25,'MarkerFaceColor','w'); for p=1:16 h3(p) = text(real(h*(IJ(j,p)+d)), imag(h*(IJ(j,p)+d)), num2str(EJ(j,p))); end set(h3,'HorizontalAlignment','center') waitforbuttonpress delete([h1 h2 h3]) end