k = 0 (slider from 0 to 50, step 0.01)
A = (15.1, 7.54)
a: y = y(A)
B = Point(a)
poly1, a_1, b, c, d, C, D = Polygon(A, B, 4.0)
E: (x(A), y(A) + (y(D) - y(A)) * k / 100.0)
e = Segment(B, D)
f = Segment(C, E)
F = Intersect(e, f)
Textpoly1: "Area = " + poly1
poly2, b_1, f_1, e_1, a_2 = Polygon(B, F, E, A)
poly3, b_2, c_1, f_2 = Polygon(C, F, B)
poly4, f_3, c_2, d_1 = Polygon(C, D, F)
poly5, d_2, e_2, f_4 = Polygon(E, F, D)
Textpoly2: "Area " + (Name[B]) + (Name[F]) + (Name[E]) + (Name[A]) + " = " + poly2
Textpoly3: "Area " + (Name[C]) + (Name[F]) + (Name[B]) + " = " + poly3
Textpoly4: "Area " + (Name[C]) + (Name[D]) + (Name[F]) + " = " + poly4
Textpoly5: "Area " + (Name[E]) + (Name[F]) + (Name[D]) + " = " + poly5
g: 100.0 * poly2 / poly1
h: 100.0 * poly3 / poly1
i: 100.0 * poly4 / poly1
j: 100.0 * poly5 / poly1
text1: "" + (round(g)) + "%"
text2: "" + (round(h)) + "%"
text3: "" + (round(i)) + "%"
text4: "" + (round(j)) + "%"
CentroidCalculated1 = Centroid(poly1)
CentroidCalculated2 = Centroid(poly2)
CentroidCalculated3 = Centroid(poly3)
CentroidCalculated4 = Centroid(poly4)
CentroidCalculated5 = Centroid(poly5)