%Chapter 10, Example 10.3, Fig 10.10 %Eric Dubois, updated 2018-12-20 %Illustration of the frequencies involved in the halftone attenuation %Required functions: Lattice_Points_2d, ds2nfu close all; clear all; %requires ds2nfu by Michelle Hirsch clear all close all %sampling matrices and portion of R^2 to plot VG = [.1474 .1614; .1614 -.1474]; UL = [-.5 -.5]'; LR = [.5 .5]'; %get the points of the lattice in the desired region xoutG = Lattice_Points_2d(VG,UL,LR); %create the plot %set the plot size and font figure %plot the points points = plot(xoutG(:,1),xoutG(:,2),'k.'); points.MarkerSize= 9; axis equal axis off set(gca,'ydir','reverse'); hold on %create the axes %u axis from -.52 to +.52 [xaxx,xaxy] = ds2nfu([-.52 .54], [0 0]); annotation('arrow',xaxx,xaxy,'headlength',5,'headwidth',5); %v axis from -.52 to .52 [yaxx,yaxy] = ds2nfu([0.0 0.0],[.52 -.54]); annotation('arrow',yaxx,yaxy,'headlength',5,'headwidth',5); text(.52,-.04,'\itu','FontName','times') text(-0.04, .52, '\itv','FontName','times') rectangle('Position',[-.5,-.5,1,1]); %Label the modulation frequencies str1 = '$$\mathbf{u}_{m,1}$$'; text(0.14,.185,str1,'Interpreter','latex'); str2 = '$$\mathbf{u}_{m,2}$$'; text(.14,-.12,str2,'Interpreter','latex'); str3 = '$$\mathbf{u}_{m,3}$$'; text(.28,.05,str3,'Interpreter','latex'); str4 = '$$\mathbf{u}_{m,4}$$'; text(.01,.33,str4,'Interpreter','latex'); str5 = '$$\mathbf{u}_{m,5}$$'; text(0.28,.35,str5,'Interpreter','latex'); str6 = '$$\mathbf{u}_{m,6}$$'; text(0.3,-.26,str6,'Interpreter','latex'); str7 = '$$\mathbf{u}_{m,7}$$'; text(0.42,.2,str7,'Interpreter','latex'); str8 = '$$\mathbf{u}_{m,8}$$'; text(0.14,.45,str8,'Interpreter','latex'); str9 = '$$\mathbf{u}_{m,9}$$'; text(0.41,-.11,str9,'Interpreter','latex'); str10 = '$$\mathbf{u}_{m,10}$$'; text(0.14,-.43,str10,'Interpreter','latex'); set(gcf,'Color',[1 1 1]);