function NE_test_int_E2_2circles
% NE_test_int_E2_2circles - test all possible circle interactions in R^2
% On input:
%     N/A
% On output:
%     figure with circles and results
% Call:
%     NE_test_int_E2_2circls;
% Author:
%     T. Henderson
%     UU
%     Summer 2023
%

clf
subplot(2,4,1);
t = [0:0.1:2*pi,2*pi];
x = cos(t);
y = sin(t);

C1 = [0,0,1,1,0];
x1 = C1(1) + C1(3)*x;
y1 = C1(2) + C1(3)*y;

C2 = [3,0,1,4,0];
x2 = C2(1) + C2(3)*x;
y2 = C2(2) + C2(3)*y;

[p1,p2,s] = NE_int_E2_2circles(C1,C2);
plot(x1,y1,'k');
hold on
axis equal
plot(x2,y2,'r');
title(['Status: ',num2str(s)]);

C3 = [0,0,1/2,1/2,0];
[p1,p2,s] = NE_int_E2_2circles(C1,C3);
subplot(2,4,2);
hold on
axis equal
x3 = C3(1) + C3(3)*x;
y3 = C3(2) + C3(3)*y;
plot(x1,y1,'k');
plot(x3,y3,'r');
title(['Status: ',num2str(s)]);

[p1,p2,s] = NE_int_E2_2circles(C3,C1);
subplot(2,4,3);
hold on
axis equal
plot(x3,y3,'k');
plot(x1,y1,'r');
title(['Status: ',num2str(s)]);

C4 = [2,0,1,3,0];
[p1,p2,s] = NE_int_E2_2circles(C1,C4);
subplot(2,4,4);
hold on
axis equal
x4 = C4(1) + C4(3)*x;
y4 = C4(2) + C4(3)*y;
plot(x1,y1,'k');
plot(x4,y4,'r');
title(['Status: ',num2str(s)]);

C5 = [0,0,1,1,0];
[p1,p2,s] = NE_int_E2_2circles(C1,C5);
subplot(2,4,5);
hold on
axis equal
x5 = C5(1) + C5(3)*x;
y5 = C5(2) + C5(3)*y;
plot(x1,y1,'k');
plot(x5,y5,'r');
title(['Status: ',num2str(s)]);

C6 = [1/2,0,1/2,1,0];
[p1,p2,s] = NE_int_E2_2circles(C1,C6);
subplot(2,4,6);
hold on
axis equal
x6 = C6(1) + C6(3)*x;
y6 = C6(2) + C6(3)*y;
plot(x1,y1,'k');
plot(x6,y6,'r');
title(['Status: ',num2str(s)]);

C7 = [1,0,1,2,0];
[p1,p2,s] = NE_int_E2_2circles(C1,C7);
subplot(2,4,7);
hold on
axis equal
x7 = C7(1) + C7(3)*x;
y7 = C7(2) + C7(3)*y;
plot(x1,y1,'k');
plot(x7,y7,'r');
title(['Status: ',num2str(s)]);

C8 = [sqrt(2)/2,sqrt(2)/2,1,0,0];
[p1,p2,s] = NE_int_E2_2circles(C1,C8);
subplot(2,4,8);
hold on
axis equal
x8 = C8(1) + C8(3)*x;
y8 = C8(2) + C8(3)*y;
plot(x1,y1,'k');
plot(x8,y8,'r');
title(['Status: ',num2str(s)]);

tch = 0;
