% Schematic33.m %
clear; clc; clf;
a = 1.1;
b = 0.8;
a1 = 0.5;
b1 = 0.4;
n = 40;
the = linspace(0, 2*pi, n);
x = a*cos(the);
y = b*sin(the);
x1 = a1*cos(the);
y1 = b1*sin(the);
the2 = 0.0;
the22 = 0.0;
AA= [cos(the2) -sin(the2); sin(the2) cos(the2)];
AA1= [cos(the22) -sin(the22); sin(the22) cos(the22)];
xx = zeros(1,n);
yy = zeros(1,n);
xx1 = zeros(1,n);
yy1 = zeros(1,n);
for i=1:n
    xx(i)=cos(the2)*x(i) - sin(the2)*y(i);
    yy(i)=sin(the2)*x(i) + cos(the2)*y(i);
end
xx = xx + 2.0;
yy = yy + 1.5;
for i=1:n
    xx1(i)=cos(the22)*x1(i) - sin(the22)*y1(i);
    yy1(i)=sin(the22)*x1(i) + cos(the22)*y1(i);
end
xx1 = xx1 + 2.0;
yy1 = yy1 + 1.5;
pos1 = [2.0; 1.5] + AA*[a;0];
pos2 = [2.0; 1.5] + AA*[0;b];
pos11 = [2.0; 1.5] + AA1*[a1;0];
pos21 = [2.0; 1.5] + AA1*[0;b1];
figure(1)
plot(xx,yy,'k-','linewidth',1)
values = [xx; yy];
patch(xx,yy,[0.8627 0.8627 0.8627])
hold on
plot(xx1, yy1,'k-','linewidth',1)
patch(xx1,yy1,[0.8 0.8 0.85])
hold on
text('Interpreter','latex', 'String','$\Omega_1$','position',[2-0.35 1.6],'FontSize',22)
text('Interpreter','latex','String','$\Omega_2$','position',[2-0.8 1.8 ],'FontSize',22)
text('Interpreter','latex','String','$\Omega_3$','position',[2-1.3 2.],'FontSize',22)
text('Interpreter','latex','String','$\Gamma_{23}$','position',[1.2 0.78],'FontSize',22)
text('Interpreter','latex','String','$\Gamma_{12}$','position',[1.5 1.13],'FontSize',22)
text('Interpreter','latex', 'String','$\rho_{1},\mu_{1}$','position',[1.9 1.43],'FontSize',22)
text('Interpreter','latex', 'String','$\rho_{2},\mu_{2}$','position',[ 2.52 1.65],'FontSize',22)
text('Interpreter','latex', 'String','$\rho_{3},\mu_{3}$','position',[ 3.1 1.9],'FontSize',22)
text(0.1, 3.2,'Top View','FontSize',24)
axis ([0 4 0 3])
N = 51;
for i = 1:N
    aline(i,1) = 2.0;
    aline(i,2) = 2/(N-1)*(i-1);
    bline(i,1) = (2/(N-1)*(i-1)*0.70+0.30)+1;
    bline(i,2) = 2/(N-1)*(i-1);
end
t = 0.15;
hold on
plot(values(1,:),values(2,:),'k','linewidth',1.5);
[m,n] = size(values);
line([0.0 3.9+t],[ 0 0 ],'color','k','linewidth',1);
line([0.0 0.0],[ 0 2.9+t ],'color','k','linewidth',1);
line([0  0.05],[1.5  1.5 ],'color','k','linewidth',1);
line([2  2],[0  0.05 ],'color','k','linewidth',1);
text('Interpreter','latex', 'String','$0$','position',[1.96 -0.13],'FontSize',24)
text('Interpreter','latex', 'String','$0$','position',[ -0.17 1.5],'FontSize',24)
plot([0 ], [2.9+t],'k^','linewidth',2,'MarkerEdgeColor','k','MarkerFaceColor','k')
plot([3.9+t ], [0],'k>','linewidth',2,'MarkerEdgeColor','k','MarkerFaceColor','k')
text('Interpreter','latex','String','$x$','position',[3.9+t -0.1],'FontSize',24)
text('Interpreter','latex','String','$y$','position',[ -0.17 2.9+t],'FontSize',24)
text('Interpreter','latex','String','$velocity$','position',[3.+t 0.2],'FontSize',26)
text('Interpreter','latex','String','$vorticity$','position',[ 0.1  2.55+t],'FontSize',26)
text('Interpreter','latex','String','$.$','position',[ -0.15 0.1 ],'FontSize',3)
text('Interpreter','latex','String','$.$','position',[ -0.2 -0.2 ],'FontSize',3)
axis image
axis off
box on
axis([-t 3.9+t -t 3+t])
set(gcf,'PaperPositionMode','auto')