L = 3 (slider from 1 to 5, step 0.1)
h = 4 (slider from 1 to 9, step 0.1)
O: (0, 0, 0)
n = 9 (slider from 3 to 9, step 1)
A: (L / ((2 * sin((180 * ° / n)))), 0, 0)
B = Rotate(A, (360 * ° / n), zAxis)
polígono1, f, g, i, j, k, l, m, p, q, C, G, I, K, M_1, S_1, A_2 = Polygon(A, B, n, zAxis)
a, D, cara1, cara2, cara3, cara7, cara9, cara11, cara13, cara14, cara15, arista1, arista2, arista3, arista4, arista5, arista6, arista22, arista23, arista29 = Pyramid(polígono1, h)
aaa = Segment(A, B)
texto1: "Área base = " + polígono1 + " cm²"
r = Segment(O, D)
c = 0 (slider from 0 to 1, step 0.01)
d, E, F, H, J, M, N, P, Q, R, S, T, U, V, W, Z, A_1, B_1, C_1, caraEFHJMNPQR, caraEFS, caraFHT, caraHJU, caraJMV, caraMNW, caraNPZ, cara5, cara6, cara4, aristaEF, aristaFH, aristaHJ, aristaJM, aristaMN, aristaNP, aristaPQ, aristaQR, aristaER, aristaES, aristaFS, aristaFT, aristaHT, aristaHU, aristaJU, aristaJV, aristaMV, aristaMW, aristaNW, aristaNZ, aristaPZ, arista8, arista9, arista10, arista11, arista12, arista7 = Net(a, c)
ap_b: L / ((2 * tan((180 * ° / n))))
texto4: "Altura cara lateral = " + (sqrt(h^(2) + ap_b^(2))) + " cm"
texto2: "Apotema base = " + ap_b + " cm"
texto5: "Volumen = " + ((polígono1 * h / 3)) + " cm³"
texto3: "Área lateral = " + (((L * n / 2) * sqrt(h^(2) + ap_b^(2)))) + " cm²"