@Atom, i believe this is related to my previous answer, if the patch method was not suitable you can augment the question there or add comments. This makes it easier for other people to track changes and solutions. Below you can find a method using the polyshape funtion. First I will try to demonstrate the principle using the regions from your previous question, since there you provided the equations. Afterwards, I will use the the same methodology on the .mat files to plot the cyan region. Hope it helps!
To start, let's first create the regions, starting with the black one:
delta = ((24544953/12500000)/14379)*2500 : 0.01 : 7;
theta_m = 2*delta - 2*sqrt(14379*delta/2500 - 24544953/12500000) + 1193/1000;
theta_p = 2*delta + 2*sqrt(14379*delta/2500 - 24544953/12500000) + 1193/1000;
delta = [fliplr(delta) delta(2:end)];
theta = [fliplr(theta_p) theta_m(2:end)];
black_region = polyshape(delta,theta);
Now create the blue, red rectangular regions. For this we need to provide the four corner points of the rectangular shape:
blue_region = polyshape([ 0 5; 0 0; 0.3414 0; 0.3414 5]);
red_region = polyshape([ 0 1.8758; 0 0; 7 0; 7 1.8758]);
Finaly set up the green triangular region. For a triangle we need 3 points, but the principle is the same:
green_region = polyshape(delta,theta);
Now that we have the four regions, we can plot them. This is not really needed, we only do it to see is the shapes are correct, and it provides as visual aid to see the intersections we are looking for:
plot(black_region ,'FaceColor','black' ,'FaceAlpha',0.5)
plot(blue_region ,'FaceColor','blue' ,'FaceAlpha',0.5)
plot(red_region ,'FaceColor','red' ,'FaceAlpha',0.5)
plot(green_region ,'FaceColor','green' ,'FaceAlpha',0.5)
title('Regions using polyshape')
xlabel('$\delta\rightarrow$','FontSize',20,'interpreter','latex','FontWeight','normal','Color','k')
ylabel('$\theta\rightarrow$','FontSize',20,'interpreter','latex','FontWeight','normal','Color','k')
Now that we have the regions as polyshapes, we can use these to find the intersection regions.
For instances, lets find the intersection between the red/green and black regions:
RG_region = intersect(red_region,green_region);
RGB_region = intersect(RG_region,black_region);
title('Intersection region using polyshape')
xlabel('$\delta\rightarrow$','FontSize',20,'interpreter','latex','FontWeight','normal','Color','k')
ylabel('$\theta\rightarrow$','FontSize',20,'interpreter','latex','FontWeight','normal','Color','k')
So now, you've seen how to find inerestions of regions using the polyshape functionality. Now let's load the .mat files and try to construct those regions.
H_H1 = load('H_H(1).mat','x'); H_H1 = H_H1.x;
H_H2 = load('H_H(2).mat','x'); H_H2 = H_H2.x;
BT_LP1 = load('BT_LP(1).mat','x'); BT_LP1 = BT_LP1.x;
BT_LP2 = load('BT_LP(2).mat','x'); BT_LP2 = BT_LP2.x;
subplot(2,2,1); plot(H_H1(3,:), H_H1(4,:), 'k'); axis([0 0.7 0 2]); grid on
subplot(2,2,2); plot(H_H2(3,:), H_H2(4,:), 'c'); axis([0 0.7 0 2]); grid on
subplot(2,2,3); plot(BT_LP1(3,:),BT_LP1(4,:),'r'); axis([0 0.7 0 2]); grid on
subplot(2,2,4); plot(BT_LP2(3,:),BT_LP2(4,:),'g'); axis([0 0.7 0 2]); grid on
From the looks of it we need to combine H_H1 and H_H2 to form a sort of triangle. And BT_LP2 and BT_LP1 appear to be the same curve.
Lets start with the H_H region, we need to add a point to form the triangle, we want to set the triangle suchs that the regions overlaps. Thus we add a point at max x and y value:
[~,idx] = unique(H_H(3,:));
delta = [H_H(3,:) H_H_x];
theta = [H_H(4,:) H_H_y];
H_H_region = polyshape(delta,theta);
Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.
To create the region with the circular edge, we need to add 2 points.
BT_LP_y1 = min( BT_LP1(4,:) );
BT_LP_y2 = max( BT_LP1(4,:) );
delta = [BT_LP1(3,:) 0 0];
theta = [BT_LP1(4,:) BT_LP_y1 BT_LP_y2];
BT_LP_region = polyshape(delta,theta);
Warning: Polyshape has duplicate vertices, intersections, or other inconsistencies that may produce inaccurate or unexpected results. Input data has been modified to create a well-defined polyshape.
Latsly we need a rectanglar region based on the black line, since we would like to use this region to do intersections, we make a temporary reion overlapping to the right of the black line:
K_region = polyshape([ 0.7 5; 0.7 0; 0.3414 0; 0.3414 5]);
plot(K_region ,'FaceColor','black','FaceAlpha',0.5)
plot(BT_LP_region ,'FaceColor','blue' ,'FaceAlpha',0.5)
plot(H_H_region ,'FaceColor','cyan' ,'FaceAlpha',0.5)
title('Regions using polyshape')
Now that we have all the regions plotted, we only need to find the intersection region. We can use the same principle as before. Start with the black and blue overlapping region. Then determine the intersection with the cyan region. The resulting region is the one you are looking for.
BB_region = intersect(K_region,BT_LP_region);
BBC_region = intersect(BB_region,H_H_region);
title('Intersection region using polyshape')