Author: Alberto Rodríguez Santos
Date: 24 Marzo 2014

base

A_{triángulo}=\frac{b·a}{2}\
A_{polígono}=n·\frac{b·a}{2}\
Como\ n·b=p \Rightarrow
A_{polígono}=\frac{p·a}{2}

perímetro

apotema

Triángulación

C2 = 1
d = 0 (slider from 0 to 1, step 0.1)
dd: 1 - d
n = 10 (slider from 1 to 10, step 1)
α: 180° - (n - 2) * 180 * ° / n
l = 2 (slider from -5 to 5, step 1)
D2: l * (cos(dd * C2 * α), sin(dd * C2 * α))
A1 = (0.917846336137206, -0.6809827655211542)
C1 = 0 (slider from -5 to 5, step 1)
C3: 2 * C2 - C1
D3: l * (cos(dd * C3 * α), sin(dd * C3 * α))
C4: 2 * C3 - C2
D4: l * (cos(dd * C4 * α), sin(dd * C4 * α))
C5: 2 * C4 - C3
D5: l * (cos(dd * C5 * α), sin(dd * C5 * α))
C6: 2 * C5 - C4
D6: l * (cos(dd * C6 * α), sin(dd * C6 * α))
C7: 2 * C6 - C5
C8: 2 * C7 - C6
C9: 2 * C8 - C7
C10: 2 * C9 - C8
D10: l * (cos(dd * C10 * α), sin(dd * C10 * α))
D9: l * (cos(dd * C9 * α), sin(dd * C9 * α))
D8: l * (cos(dd * C8 * α), sin(dd * C8 * α))
D7: l * (cos(dd * C7 * α), sin(dd * C7 * α))
D1: l * (cos(dd * C1 * α), sin(dd * C1 * α))
A2: A1 + D1
A3: A2 + D2
A4: A3 + D3
A5: A4 + D4
A6: A5 + D5
A7: A6 + D6
A8: A7 + D7
A9: A8 + D8
A10: A9 + D9
A11: A10 + D10
r: l / (2 * cos(90° * (n - 2) / n))
E1 = LineBisector(A1, A2)
E2 = LineBisector(A2, A3)
E3 = LineBisector(A3, A4)
E4 = LineBisector(A4, A5)
E5 = LineBisector(A5, A6)
E6 = LineBisector(A6, A7)
E7 = LineBisector(A7, A8)
F1 = Circle(A1, r)
F2 = Circle(A2, r)
F3 = Circle(A3, r)
F4 = Circle(A4, r)
F5 = Circle(A5, r)
F6 = Circle(A6, r)
F7 = Circle(A7, r)
G1 = Intersect(F1, E1, 2)
G2 = Intersect(F2, E2, 2)
G3 = Intersect(F3, E3, 2)
G4 = Intersect(F4, E4, 2)
G5 = Intersect(F5, E5, 2)
G6 = Intersect(F6, E6, 2)
E8 = LineBisector(A8, A9)
G7 = Intersect(F7, E7, 2)
H1, I1, J1, K1 = Polygon(A1, A2, G1)
H2, I2, J2, K2 = Polygon(A2, A3, G2)
H3, I3, J3, K3 = Polygon(A3, A4, G3)
H4, I4, J4, K4 = Polygon(A4, A5, G4)
H5, I5, J5, K5 = Polygon(A5, A6, G5)
H6, I6, J6, K6 = Polygon(A6, A7, G6)
H7, I7, J7, K7 = Polygon(A7, A8, G7)
C11: 2 * C10 - C9
D11: l * (cos(dd * C11 * α), sin(dd * C11 * α))
F8 = Circle(A8, r)
G8 = Intersect(F8, E8, 2)
H8, I8, J8, K8 = Polygon(A8, A9, G8)
E9 = LineBisector(A9, A10)
F9 = Circle(A9, r)
E10 = LineBisector(A10, A11)
F10 = Circle(A10, r)
G10 = Intersect(F10, E10, 2)
H10, I10, J10, K10 = Polygon(A10, A11, G10)
G9 = Intersect(F9, E9, 2)
H9, I9, J9, K9 = Polygon(A9, A10, G9)
polígono1, a, b, c, e, f, g, h, i, j, k, A, B, C, D, E, F, G, H = Polygon(A1, A2, n)
I = Intersect(E1, I1)
A1b: A1 + (0, -1)
A1c: A1b + n * D1
u = Vector(A1b, A1c)
v = Vector(A1c, A1b)
J = Intersect(E10, I10)
m = Segment(G10, J)
o = false