Clear["Global`*"];
SeedRandom[1234];
k = 5;
n = 2 k;
poly = RandomPolygon[{"Convex", k}];
lines = MeshPrimitives[poly, 1];
extendLines =
lines /. Line[{a_, b_}] :>
Line[{a, b + RandomReal[{.4, .6}]*(b - a)}];
polys0 =
Partition[extendLines, 2, 1,
1] /. {Line[{a_, b_}], Line[{c_, d_}]} :>
Polygon[{c, b, b + d - c, d}];
pairs = Partition[extendLines, 2, 1,
1] /. {Line[{a_, b_}], Line[{c_, d_}]} :> Point[{b, b + d - c, d}];
countAngles[pts_] :=
Table[PlanarAngle[{pts[[Mod[i - 1, Length@ptsThread[PlanarAngle[#, 1]]],"Counterclockwise"]
& /@
pts[[Mod[i, Length@ptsPartition[pts, 1]]]3, pts[[Mod[i + 1, Length@pts, 1]]]{2},
"Counterclockwise"]] > π, {i, 1, Length@pts}];π];
test[pts_] := And @@ countAngles[pts];
extend[pts_] := Module[{n, pos, p, poly, a, b, c, d}, n = Length@pts;
pos = First@FirstPosition[countAngles@pts, False];
a = pts[[Mod[pos - 1, n, 1]]];
b = pts[[pos]];
c = pts[[Mod[pos + 1, n, 1]]];
d = a + c - b;
Sow[Polygon[{a, b, c, d}]];
ReplacePart[pts, pos -> d]];
pts = Flatten[pairs[[;; , 1]][[;; , 1 ;; 2]], 1];
result = Reap@NestWhileList[extend, pts, Not@*test];
g = Graphics[{LightYellow,
poly, {EdgeForm[Black], FaceForm[LightBlue], polys0}, {FaceForm[Orange], EdgeForm[Black], #} & /@
First@result[[2]]}]