%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%      TFY4340 February 2010 Exercise 2 Triangular lattice                   %
%      Nearest neighbour tight binding band structure                        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% x=kx*a, y=ky*a
[x,y] = meshgrid(-6*pi/3:(12*pi/3)/100:6*pi/3,-3*pi/sqrt(3):(6*pi/sqrt(3))/100:3*pi/sqrt(3));
% Make array for gm=ky*a from Gamma-point (k=0) to M-point
% (kx=0,ky*a=2*pi/sqrt(3))
gm = 0:(2*pi/sqrt(3))/100:2*pi/sqrt(3);
% Make array for gk=kx*a from Gamma-point (k=0) to K-point
% (ky=0,kx*a=4*pi/3)
gk = 0:(4*pi/3)/100:4*pi/3;
% We set gamma=-1, then the TB band structure is (with E(0)=0)
E = 8 - 4.*cos(x./2).*(cos(x./2)+cos(sqrt(3).*y./2));
% The command figure simply asks for a new figure
figure;
% The command meshc(x,y,E) makes a 3D plot of E(x,y), including contours on the xy-plane:
meshc(x,y,E);
% The command axis([a b c d e f]) sets axes for 3D plots like this:
% a < x < b, c < y < d, e < z < f
% axis([-2 2 -2 2 0 10]);
% Command caxis([zmin zmax]) sets color coding such that blue is zmin
% and red is zmax
caxis([0 10]);
% Axis text:
xlabel('kx*a');
ylabel('ky*a');
zlabel('E');
% Make plot of E(k) from Gamma to M:
E = 8 - 4.*(1.0+cos(sqrt(3).*gm./2));
figure;
plot(gm,E);
% Axis text:
xlabel('ky*a between Gamma and M');
ylabel('E');
% Make plot of E(k) from Gamma to K:
E = 8 - 4.*cos(gk./2).*(cos(gk./2)+1.0);
figure;
plot(gk,E);
% Axis text:
xlabel('kx*a between Gamma and K');
ylabel('E');