I'm trying to understand how the Hyperplane Separation Theorem works.
I found a function on MATLAB that implements it, accepting the parameters
rect1 = [0 0; -1 3; 6 4; 7 1];
rect2 = [12 0; 14 1; 13 8; 12 7];
Running the algorithm gives a nice looking plot
Clearly there is some projection going on from 3D space to 2D as these rectangles are flat.
My question is, what exactly is the input parameters for rect1 and rect2 supposed to be representing? I'm not following the four pairs of 2 integers. How can I convert from 8 vertices of a rectangle to the parameters that would be used an input to this function?


The given definition of the $\bf{\color{red}{red}}$ quadrilateral is wrong. The correct definition is $\bf{rect2 = [2\space 0; 4\space 1; 3\space 8; 2\space 7];}$. After meddling with the given diagrams using GeoGebra, I also found out that both quadrilaterals lie on the same plane.
Did you go through the code of this MATLAB function $\bf{RectIntersect\left(rect1,\space rect2\right)}$? It looks like it can only find the intersection of two convex polygons lying on the same plane. Probably, the method used in this function is based on this stack overflow question, which was posted and successfully answered 14 years ago.
So, the eight pairs of two integers used as the elements of the two input array parameters of RectIntersect correspond to the $x-\space\text{and}\space y-\text{coordinates}$ of the eight vertices of the two quadrilaterals.