% Chapter 13, Fig.13.3 % Eric Dubois, updated 2019-01-15 % Required functions: Lattice_Points_2d, ds2nfu % Plot a 2D reciprocal lattice clear all close all %sampling matrix and portion of R^2 to plot V = [.5747 .3448; 1.6092 -1.0345]; UL = [-3 -2]'; LR = [3 2]'; %get the points of the lattice in the desired region xout = Lattice_Points_2d(V,UL,LR); %create the plot figure %plot the points plot(xout(:,1),xout(:,2),'ko','markerfacecolor','k') axis equal axis off set(gca,'ydir','reverse'); axis([UL(1) LR(1) UL(2) LR(2)]) hold on %create the axes %x axis from -3 to +3 [xaxx xaxy] = ds2nfu([-3 3], [0 0]); annotation('arrow',xaxx,xaxy,'headlength',5,'headwidth',5); %y axis from -2 to +2 [yaxx yaxy] = ds2nfu([0 0],[2 -2.2]); annotation('arrow',yaxx,yaxy,'headlength',5,'headwidth',5); text(3,-.2,'\itu') text(0.2, 2.1, '\itv') %plot and label the basis vectors [v1x v1y] = ds2nfu([0 .97*V(1,1)],[0,-.97*V(2,1)]); annotation('arrow',v1x,v1y,'headlength',5,'headwidth',5); [v2x v2y] = ds2nfu([0 .95*V(1,2)],[0,-.95*V(2,2)]); annotation('arrow',v2x,v2y,'headlength',5,'headwidth',5); text(1.1*V(1,1), 1.1*V(2,1), '{\bfu}_1'); text(1.1*V(1,2), 1.1*V(2,2), '{\bfu}_2'); %plot x-axis tick and label plot([1 1],[-.05 .05],'k') text(1,-.1,'1/\itX') %plot y-axis tick and label plot([-.05 .05],[1 1],'k') text(.05,1,'1/\itX') set(gcf,'Color',[1 1 1]);