Nº triangular

Nº cuadrado

Nº rectangular

Nº pentagonal

Nº hexagonal

Mostrar tabla de valores

n

T(n)

C(n)

R(n)

P(n)

H(n)

Otros poligonales

mmm = 1 (slider from 1 to 10, step 1)
n: round(mmm)
cuadrado1 = Sequence(Sequence[Circle[(k - 2.0, 6.0 - s), 0.5], k, 1.0, n], s, 1.0, n)
a = false
b = false
c = false
texto1: "T(" + n + ") = " + (n * (n + 1.0) / 2.0)
texto2: "C(" + n + ") = " + (n * n)
texto3: "R(" + n + ") = " + (n * (n + 1.0))
texto4: "n = " + n
listacentrospenta = Sequence(Centroid[Polygon[(-1.0, -4.0), (-1.0 + k, -(4.0)), 5.0]], k, 1.0, n)
d = false
P1 = (-1, -4)
pentagonal1 = Sequence(Sequence[Rotate[(-1.0, -4.0), s * 360.0° / 5.0, Element[listacentrospenta, k]], s, 1.0, 5.0], k, 0.0, n - 1.0)
texto5: "P(" + n + ") = " + (n * (3.0 * n - 1.0) / 2.0)
listacentroshexa = Sequence(Centroid[Polygon[(-1.0, -4.0), (-1.0 + k, -(4.0)), 6.0]], k, 1.0, n)
hexagonal1 = Sequence(Sequence[Rotate[(-1.0, -4.0), s * 360.0° / 6.0, Element[listacentroshexa, k]], s, 1.0, 6.0], k, 0.0, n - 1.0)
hexagonal2 = Sequence(Polygon[(-1.0, -4.0), Rotate[(-1.0, -4.0), 60.0*°, Element[listacentroshexa, k]], 6.0], k, 0.0, n - 1.0)
e = false
hexagonal3 = Sequence(Sequence[Sequence[Element[Element[hexagonal1, k], s] + t * (Element[Element[hexagonal1, k], s + 1.0] - Element[Element[hexagonal1, k], s]) / (k - 1.0), t, 1.0, k - 1.0], s, 1.0, n + 1.0], k, 1.0, n)
texto6: "H(" + n + ") = " + (n * (4.0 * n - 2.0) / 2.0)
P2: P1
f = false
listatab1x = Sequence(Text[k, (12.0, 4.5 - 0.8 * k)], k, 1.0, n)
listatab1y = Sequence(Text[k * (k + 1.0) / 2.0, (13.0, 4.5 - 0.8 * k)], k, 1.0, n)
listatab2y = Sequence(Text[k^(2.0), (13.0, 4.5 - 0.8 * k)], k, 1.0, n)
listatab3y = Sequence(Text[k * (k + 1.0), (13.0, 4.5 - 0.8 * k)], k, 1.0, n)
listatab4y = Sequence(Text[k * (3.0 * k - 1.0) / 2.0, (13.0, 4.5 - 0.8 * k)], k, 1.0, n)
listatab5y = Sequence(Text[k * (4.0 * k - 2.0) / 2.0, (13.0, 4.5 - 0.8 * k)], k, 1.0, n)
tablavert = Sequence(Segment[(11.5 + k * 1.1, 5.0), (11.5 + k * 1.1, 5.0 - 0.8 * (n + 1.0))], k, 0.0, 2.0)
tablahoriz = Sequence(Segment[(11.5, 5.8 - 0.8 * k), (13.7, 5.8 - 0.8 * k)], k, 1.0, n + 2.0)
A = (2.84, -3.44)
B = (-3.34, -0.44)
C = (-3.7600000000000002, -4.38)
D = (5.7, 2.72)
E = (8.1, -3.7600000000000002)
rectangular1 = Sequence(Sequence[Circle[(k - 2.0, 6.0 - s + 0.0 * s), 0.5 + 0.0 * n], k, 1.0, n + 1.0], s, 1.0, n)
triangular1 = Sequence(Sequence[Circle[(k - 2.0, 6.0 - s + 0.0 * n), 0.5], k, 1.0, s], s, 1.0, n)
l = 3 (slider from 3 to 12, step 1)
listacentrospoli = Sequence(Centroid[Polygon[(-1.0, -4.0), (-1.0 + k, -(4.0)), l]], k, 1.0, n)
poligonal1 = Sequence(Sequence[Rotate[(-1.0, -4.0), s * 360.0° / l + 0.0 * s, Element[listacentrospoli, k]], s, 1.0, l], k, 0.0, n - 1.0)
g = false
texto8: "Nº de lados del polígono: " + l
P3: P1
listatabTy = Sequence(Text[((l - 2.0) * k^(2.0) - (l - 4.0) * k) / 2.0, (13.0, 4.5 - 0.8 * k)], k, 1.0, n)
Polin: ((l - 2.0) * n^(2.0) - (l - 4.0) * n) / 2.0
texto9: "P" + l + "(n)"
texto10: "P" + l + "(" + n + ") = " + Polin
pentagonal3 = Sequence(Sequence[Sequence[Element[Element[pentagonal1, k], s] + t * (Element[Element[pentagonal1, k], s + 1.0] - Element[Element[pentagonal1, k], s]) / (k - 1.0), t, 1.0, k - 1.0], s, 1.0, n], k, 2.0, n)
poligonal2 = Sequence(Polygon[(-1.0, -4.0), Rotate[(-1.0, -4.0), 360.0° / l, Element[listacentrospoli, k + 0.0 * k]], l], k, 0.0, n - 1.0)
poligonal3 = Sequence(Sequence[Sequence[Element[Element[poligonal1, k], s] + t * (Element[Element[poligonal1, k], s + 1.0 + 0.0 * s] - Element[Element[poligonal1, k + 0.0 * s], s]) / (k - 1.0), t, 0.0, k - 1.0], s, 1.0, l], k, 1.0, n)
pentagonal3a = Sequence(Sequence[Sequence[Element[Element[pentagonal1, k], s] + t * (Element[Element[pentagonal1, k], s + 1.0] - Element[Element[pentagonal1, k], s]) / (k - 1.0), t, 1.0, k - 1.0], s, 1.0, n], k, 2.0, n)
hexagonal3a = Sequence(Sequence[Sequence[Element[Element[hexagonal1, k], s] + t * (Element[Element[hexagonal1, k], s + 1.0] - Element[Element[hexagonal1, k], s]) / (k - 1.0), t, 1.0, k - 1.0], s, 1.0, n + 1.0], k, 1.0, n)
pentagonal1a = Sequence(Sequence[Rotate[(-1.0, -4.0), s * 360.0° / 5.0, Element[listacentrospenta, k]], s, 1.0, 5.0], k, 1.0, n - 1.0)
pentagonal2a = Sequence(Polygon[(-1.0, -4.0), Rotate[(-1.0, -4.0), 72.0*°, Element[listacentrospenta, k]], 5.0], k, 1.0, n - 1.0)
pentagonal2 = Sequence(Polygon[(-1.0, -4.0), Rotate[(-1.0, -4.0), 72.0*°, Element[listacentrospenta, k]], 5.0], k, 0.0, n - 1.0)
hexagonal1a = Sequence(Sequence[Rotate[(-1.0, -4.0), s * 360.0° / 6.0, Element[listacentroshexa, k]], s, 1.0, 6.0], k, 1.0, n - 1.0)
hexagonal2a = Sequence(Polygon[(-1.0, -4.0), Rotate[(-1.0, -4.0), 60.0*°, Element[listacentroshexa, k]], 6.0], k, 1.0, n - 1.0)
poligonal1a = Sequence(Sequence[Rotate[(-1.0, -4.0), s * 360.0° / l + 0.0 * s, Element[listacentrospoli, k]], s, 1.0, l], k, 1.0, n - 1.0)
poligonal2a = Sequence(Polygon[(-1.0, -4.0), Rotate[(-1.0, -4.0), 360.0° / l, Element[listacentrospoli, k + 0.0 * k]], l], k, 1.0, n - 1.0)
poligonal3a = Sequence(Sequence[Sequence[Element[Element[poligonal1, k], s] + t * (Element[Element[poligonal1, k], s + 1.0 + 0.0 * s] - Element[Element[poligonal1, k + 0.0 * s], s]) / (k - 1.0), t, 1.0, k - 1.0], s, 1.0, l], k, 1.0, n)