I have 2 questions about convex hulls (in 2D only):
In the picture above, I have a blue curve AB defined by X & Y coordinates. The convex hull of AB is computed with Matlab and shown in red.
My first question - is there an analytical way to calculate the coordinates of points C & D from the blue curve AB? Line CD is the edge of the convex hull and C and D are the points which first intersect line AB. In the picture above, I have identified the coordinates of C & D by manually inspecting the data in Matlab. Alternatively, I could have identified C & D by comparing the coordinates of line AB and the convex hull by brute force. But is there a smarter mathematical approach?
My second question - in the reverse scenario, let's say I am given the coordinates of points C & D. How can I mathematically prove that line CD is the edge of the convex hull of AB?
I am new to the idea of convex hulls. I understand visually what it means (stretching a rubber band over the data points), but mathematically, this is new to me.
Thanks in advance for any help!
The following is the code used to generate the picture above in Matlab.
X = [-50 1:1:100]';
Y = [0;13.02;22.58;29.82;35.44;39.88;43.44;46.34;48.72;50.70;52.36;53.77;54.96;55.98;56.86;57.62;58.29;58.87;59.39;59.86;60.27;60.65;61;61.32;61.62;61.90;62.17;62.43;62.68;62.92;63.16;63.40;63.64;63.88;64.12;64.36;64.61;64.87;65.13;65.40;65.67;65.96;66.25;66.55;66.87;67.19;67.52;67.87;68.22;68.59;68.97;69.36;69.77;70.19;70.62;71.07;71.53;72.01;72.50;73;73.53;74.06;74.62;75.19;75.78;76.38;77;77.64;78.30;78.98;79.68;80.39;81.13;81.88;82.66;83.46;84.28;85.12;85.98;86.87;87.78;88.71;89.67;90.65;91.66;92.69;93.75;94.84;95.95;97.09;98.26;99.46;100.69;101.95;103.24;104.56;105.92;107.31;108.73;110.18;111.67];
conv_hull_area = convhull(X,Y);
plot(X,Y,'LineWidth',1.5);
hold on
plot(X(conv_hull_area),Y(conv_hull_area),'--','LineWidth',1.5)
plot([1 81],[13.02 88.71],'gX:','LineWidth',1)
hold off
xlabel('X');
ylabel('Y');
hleg=legend('Curve AB','Convex hull of AB','Line CD');