Función 'área del triángulo rojo' 

O = (0, 0)
J = Point(xAxis)
i = Ray(O, J)
n = 3 (slider from 3 to 7, step 1)
B = Point(i)
A = Mirror(B, O)
poly1, a1, b1, b3, C = Polygon(A, B, n)
a = Segment(A, B)
c: a / 2.0
k = Ellipse(A, B, a)
D = Point(k)
poly2, b2, a2, c2 = Polygon(A, D, B)
text1: "Perímetro (de ambos triángulos) = " + (3.0 * a)
b: sqrt(3.0) * a / 2.0
f(x) = a * sqrt(3.0 * a^(2.0) - 3.0 * x^(2.0)) / 4.0
d = Ellipse((-1.0 * 1.0 * a / 2.0, 0.0), (a / 2.0, 0.0), a)
E = Midpoint(A, B)
α = Angle(B, E, D)
F: (a, 0.0)
F' = Rotate(F, α, O)
e = Line(O, F')
G = Intersect(d, e, 2.0)
g = OrthogonalLine(G, xAxis)
H = Intersect(f, g, (-2.660207996243167, 5.612609806267239))
I: (x(G), 0.0)
h = Segment(H, I)
j = OrthogonalLine(B, xAxis)
K = Intersect(f, j, (2.0599999999999996, 6.3653999999999975))