Deslízame

R

Ir a escena 2

Volver a escena 1

n1 = 2 (slider from 2 to 30, step 1)
O = (7.640000000000001, 0.28)
R = 4 (slider from 1 to 4, step 0.1)
O1: O + (R, 0)
O3 = Rotate(O1, 175*°, O)
O2 = Rotate(O1, 5*°, O)
N: 4 * round(n1)
e = CircleArc(O, O2, O3)
d = 0 (slider from 0 to 3, step 0.01)
t1 = If(d < 1, d, 1)
t2 = If(d > 1, If[d > 2, 1, d - 1], 0)
c = Circle(O, R)
A = Point(e)
a = Tangent(A, c)
α = If(y(A) ≥ 0, atan(Slope[a]), atan(Slope[a]) + 3.141592653589793)
A' = Mirror(A, O)
A'' = Rotate(A', 2 * 3.141592653589793 / N, O)
b = Segment(A', A'')
Lcos = Sequence(cos(α + (2 * s - 1) * (1 - t1) * 3.141592653589793 / N), s, 1, N / 4)
Lsen = Sequence(sin(α + (2 * s - 1) * (1 - t1) * 3.141592653589793 / N), s, 1, N / 4)
SumCos = Sequence(Sum[Lcos, s], s, 1, N / 4)
SumSen = Sequence(Sum[Lsen, s], s, 1, N / 4)
L1a = Sequence(A' + b * (Element[SumCos, s], Element[SumSen, s]), s, 1, N / 4)
L1b = Sequence(Mirror[Element[L1a, s], Line[A, A']], s, 1, N / 4)
L1c = Join({Reverse[L1b], {A'}, L1a})
B = Rotate(Element[L1a, 1], 3.141592653589793 / 2 - 3.141592653589793 / N, A')
C: A' + R * UnitVector[Vector[A', B]]
D = Mirror(C, Line[A, A'])
L2 = Join({{B}, Sequence[Rotate[Element[L1a, s + 1], 3.141592653589793 / 2 - 3.141592653589793 / N, Element[L1a, s]], s, 1, N / 4 - 1]})
L3a = Sequence(Element[L1a, s] + R * UnitVector[Vector[Element[L1a, s], Element[L2, s + 1]]], s, 1, N / 4 - 1)
L3b = Sequence(Mirror[Element[L3a, s], Line[A, A']], s, 1, N / 4 - 1)
L3c = Join({Reverse[L3b], {D}, {C}, L3a})
E = Rotate(A' + b * (cos(α + (1 - t1) * 3.141592653589793 / N), sin(α + (1 - t1) * 3.141592653589793 / N)), 3.141592653589793 / 2 - 3.141592653589793 / N, A')
F: A' + R * UnitVector[Vector[A', E]]
u = Vector(A, F)
L4 = Sequence(t2 * u + Mirror[Element[L1c, s], O], s, 1, N / 2 + 1)
L5a = Sequence(Mirror[Element[L3c, s], O], s, 1, N / 2)
L5b = Sequence(Element[L5a, s] + t2 * u, s, 1, N / 2)
G: F - UnitVector[u] / 2
H: Element[L4, 1] - UnitVector[u] / 2
t3 = If(d > 2, d - 2, 0)
I: G + t3 * Vector[G, H]
v1 = Vector(G, I)
w1 = Vector(G, G - v1)
K: Element[L1a, N / 4] + UnitVector[v1] / 2
J: Element[L4, 1] + UnitVector[v1] / 2
L: (J + K) / 2
M: L + t3 * Vector[L, K]
v2 = Vector(L, M)
w2 = Vector(L, L - v2)
texto4: "Semicircunferencia = π R = " + (3.141592653589793 * R)
estado = 2 (slider from 1 to 2, step 1)
L6b1 = Sequence(Segment[Element[L4, s], Element[L4, s + 1]], s, 1, N / 2 + 1)
L6b2 = Sequence(Segment[Element[L4, s], Element[L5b, s]], s, 1, N / 2 + 1)
L6a1 = Sequence(Segment[Element[L1c, s], Element[L1c, s + 1]], s, 1, N / 2 + 1)
L6a2 = Sequence(Segment[Element[L1c, s], Element[L3c, s]], s, 1, N / 2 + 1)
L6b = Sequence(Polygon[Element[L4, s], Element[L4, s + 1], Element[L5b, s]], s, 1, N / 2 + 1)
L6a = Sequence(Polygon[Element[L1c, s], Element[L1c, s + 1], Element[L3c, s]], s, 1, N / 2 + 1)
texto1 = If(N > 36, "≅ π R", "semiperímetro")
Lcos1 = Sequence(cos(α + (2 * s - 1) * 3.141592653589793 / N), s, 1, N / 4)
Lsen1 = Sequence(sin(α + (2 * s - 1) * 3.141592653589793 / N), s, 1, N / 4)
SumCos1 = Sequence(Sum[Lcos1, s], s, 1, N / 4)
SumSen1 = Sequence(Sum[Lsen1, s], s, 1, N / 4)
L1a1 = Sequence(A' + b * (Element[SumCos1, s], Element[SumSen1, s]), s, 1, N / 4)
L1b1 = Sequence(Mirror[Element[L1a1, s], Line[A, A']], s, 1, N / 4)
L1c1 = Join({Reverse[L1b1], {A'}, L1a1})
L41 = Sequence(Mirror[Element[L1c1, s], O], s, 1, N / 2 + 1)
L6a101 = Sequence(Segment[Element[L1c1, s], Element[L1c1, s + 1]], s, 1, N / 2 + 1)
L6b101 = Sequence(Segment[Element[L41, s], Element[L41, s + 1]], s, 1, N / 2 + 1)
f = Segment(O, A)
texto3: "Semiperímetro = Lado x N/2 = " + b + " x " + (N / 2) + " = " + (b * N / 2)
texto8: "R = " + R
texto7: "N = " + N