clear all; close all; clc;
% . . Create 3 coordinate system examples

% . . Tilted Cartesian

e1=[0:200:5000];
e3=[0:200:5000];

[E1,E3]=meshgrid(e1,e3);

theta=-25/180*pi;

X1=cos(theta).*E1 - sin(theta).*E3;
X3=sin(theta).*E1 + cos(theta).*E3;


figure(1)
%subplot(1,3,1)
axes('position',[0,0.25,.35,.35])
hold on

for ii=1:length(e1)
	plot(X1(:,ii),X3(:,ii),'r')
end	
for ii=1:length(e3)
	plot(X1(ii,:),X3(ii,:),'b')
end	

axis equal 
axis off
axis ij

t1=text(-000,-700,'a)');
set(t1,'FontSize',16);



clear e1 e3 E1 E3 X1 X3
a=1;
e1=[5:10:175]/180*pi;
e3=[200:200:3000];

[E1,E3]=meshgrid(e1,e3);

X1= a.*E3.*cos(E1);
X3= a.*E3.*sin(E1);

%subplot(1,3,2)
axes('position',[0.3,0.25,.30,.30])
hold on

for ii=1:length(e1)
	plot(X1(:,ii),X3(:,ii),'r')
end	
for ii=1:length(e3)
	plot(X1(ii,:),X3(ii,:),'b')
end	

t1=text(-3000,-400,'b)');
set(t1,'FontSize',16);

axis equal 
axis off
axis ij


clear e1 e3 E1 E3 X1 X3
a=1000;
e1=[5:10:175]/180*pi;
e3=[0:0.1:2.2];

[E1,E3]=meshgrid(e1,e3);

X1= a.*cosh(E3).*cos(E1);
X3= a.*sinh(E3).*sin(E1);


%subplot(1,3,3)
axes('position',[0.65,0.25,.30,.30])
hold on

for ii=1:length(e1)
	plot(X1(:,ii),X3(:,ii),'r')
end	
for ii=1:length(e3)
	plot(X1(ii,:),X3(ii,:),'b')
end	

axis equal 
axis off
axis ij

t1=text(-4500,-600,'c)');
set(t1,'FontSize',16);

print -depsc2 COORDS.eps