•  example: Graph with PHP.

With desmos:  •  If the polygon is a triangle you can study it with other scripts. This script warns, however, if the triangle is rectangle: •  I connect the opposite midpoints on the sides of a convex (i.e. with all angles less than 180°) quadrilateral to form line segments. These line segments formed 4 quadrilaterals within the original quadrilateral. Is the sum of the areas of the non-adjacent quadrilateral equal to the sum of the remaining quadrilaterals? A + B = C + D ?

I try with the four vertices  P1 = (0,0), P2 = (6,1), P3 = (8,5), P4 = (2,6)  (see the picture).
The midponts are  M1 = (6/2,1/2) = (3,0.5), M2 = (6+(8-6)/2,1+(5-1)/2) = (7,3), M3 = (8+(2-8)/2,5+(6-5)/2) = (5,5.5), M4 = (2/2,6/2) = (1,3).
I find the intersection of M1-M3 and M2-M4 with line-line: ```   D               B               C               A
Enter x         Enter x         Enter x         Enter x
4, 1, 0, 3      4, 7, 6, 3      4, 5, 8, 7      4, 5, 2, 1
Enter y         Enter y         Enter y         Enter y
3, 3, 0, 0.5    3, 3, 1, 0.5    3, 5.5, 5, 3    3, 5.5, 6, 3
area = 8        area = 6.5      area = 7        area = 8.5```

D + C = 8 + 7 = 15;  A + B = 8.5 + 6.5 = 15.  OK

 I also try with (0,4), (5,0), (13,10), (6,11). Midpoints: (2.5,2), (9,5), (9.5,10.5), (3,7.5). Intersection of M1-M3 and M2-M4:  ```            x                 y
D     6, 3, 0, 2.5     6.25, 7.5, 4, 2       area = 15.9375
B     6, 2.5, 5, 9     6.25, 2, 0, 5         area = 18.8125
C     6, 9, 13, 9.5    6.25, 5, 10, 10.5     area = 18.3125
A     6, 9.5, 6, 3     6.25, 10.5, 11, 7.5   area = 15.4375
```

D + C = 15.9375 + 18.3125 = 34.25;  A + B = 15.4375 + 18.8125 = 34.25.  OK