Permutar

a

Rastro

Buscar

yG = 5.88 (slider from 5.7 to 5.9, step 0.1)
xG = -1.8 (slider from -2.1 to -1.8, step 0.01)
t = 0 (slider from 0 to 2, step 1.0E-4)
nn = 10 (slider from 1 to 10, step 1)
n: round(nn)
p = false
mD: (¬p) ∧ (t  <  0.99) ∧ n ≟ 1 ∨ (¬p) ∧ (t > 1) ∧ (n ≟ 1 ∨ n ≟ 2 ∨ n ≟ 4 ∨ n ≟ 7) ∨ p ∧ (t  <  0.99) ∧ (n ≟ 1 ∨ n ≟ 2 ∨ n ≟ 4 ∨ n ≟ 7) ∨ p ∧ (t > 1) ∧ n ≟ 1
A2 = (5.42, -1.16)
g2 = Circle(A2, 2)
G2 = Point(g2)
B2 = (5.58, -0.08)
u2 = Vector(A2, B2)
s2 = Line(A2, B2)
A1 = (1.84, -2.26)
B1 = (4.5, -0.58)
s1 = Line(A1, B1)
u1 = Vector(A1, B1)
g1 = Circle(A1, 2)
G1 = Point(g1)
E1 = Corner(cisne1, 1)
E2 = Corner(cisne1, 2)
M = Midpoint(E1, E2)
ββ = Angle(A2 + (2 * UnitVector[Vector[A2, M]]), A2, G2)
β = Angle(A2 + (2 * UnitVector[Vector[A2, M]]), A2, G2)
β0 = If(ββ > 3.141592653589793, ((-β)) / °, β / °)
αα = Angle(A1 + (2 * UnitVector[Vector[A1, M]]), A1, G1)
α = Angle(A1 + (2 * UnitVector[Vector[A1, M]]), A1, G1)
α0 = If(αα > 3.141592653589793, ((-α)) / °, α / °)
cisnesMP: {Translate[cisne1, u2], Rotate[cisne1, β0°, A2], Mirror[cisne1, s2], Translate[Mirror[cisne1, s2], u2]}
cisnesM: {Translate[cisne1, u1], Rotate[cisne1, α0°, A1], Mirror[cisne1, s1], Translate[Mirror[cisne1, s1], u1]}
cisneM = If(p, If[n > 9, Element[cisnesMP, 1], If[n ≟ 6 ∨ n ≟ 9, Element[cisnesMP, 2], If[n ≟ 3 ∨ n ≟ 5 ∨ n ≟ 8, Element[cisnesMP, 3], Element[cisnesMP, 4]]]], If[n > 6, Element[cisnesM, 1], If[n > 3, Element[cisnesM, 2], If[n > 1, Element[cisnesM, 3], Element[cisnesM, 4]]]])
Goma: (xG, yG)
titulos: {"\fgcolor{CCCC00}{T}\; \fgcolor{00AACC}{T}", "\fgcolor{CCCC00}{G}\; \fgcolor{00AACC}{T}", "\fgcolor{CCCC00}{S}\; \fgcolor{00AACC}{T}", "\fgcolor{CCCC00}{D}\; \fgcolor{00AACC}{T}", "\fgcolor{CCCC00}{G}\; \fgcolor{00AACC}{G}", "\fgcolor{CCCC00}{S}\; \fgcolor{00AACC}{G}", "\fgcolor{CCCC00}{D}\; \fgcolor{00AACC}{G}", "\fgcolor{CCCC00}{S}\; \fgcolor{00AACC}{S}", "\fgcolor{CCCC00}{D}\; \fgcolor{00AACC}{S}", "\fgcolor{CCCC00}{D}\; \fgcolor{00AACC}{D}"}
color = If((¬p) ∧ (t ≤ 1) ∨ p ∧ (t > 1), 1, 0)
t1 = If(mD, (2 * Min[t, 1]), Min[t, 1])
r = false
α' = Angle(A1 + (2 * UnitVector[Vector[A1, M]]), A1, G1)
β' = Angle(A2 + (2 * UnitVector[Vector[A2, M]]), A2, G2)
cisnesFP: {Translate[cisneM, u1], Rotate[cisneM, α0°, A1], Mirror[cisneM, s1], Translate[Mirror[cisneM, s1], u1]}
cisnesF: {Translate[cisneM, u2], Rotate[cisneM, β0°, A2], Mirror[cisneM, s2], Translate[Mirror[cisneM, s2], u2]}
cisneF = If(p, If[n > 6, Element[cisnesFP, 1], If[n > 3, Element[cisnesFP, 2], If[n > 1, Element[cisnesFP, 3], Element[cisnesFP, 4]]]], If[n > 9, Element[cisnesF, 1], If[n ≟ 6 ∨ n ≟ 9, Element[cisnesF, 2], If[n ≟ 3 ∨ n ≟ 5 ∨ n ≟ 8, Element[cisnesF, 3], Element[cisnesF, 4]]]])
EsqM1 = Corner(cisneM, 1)
EsqM2 = Corner(cisneM, 2)
EsqM4 = Corner(cisneM, 4)
cisneInicio = If(t ≤ 1, cisne1, cisneM)
t2 = If(mD, (2 * Max[t - 1, 0]), Max[t - 1, 0])
tm = If(t ≤ 1, t1, t2)
um = If((t ≤ 1) ∧ (¬p) ∨ p ∧ (t > 1), u1, u2)
αm = If((t ≤ 1) ∧ (¬p) ∨ p ∧ (t > 1), α0, β0)
Am = If((t ≤ 1) ∧ (¬p) ∨ p ∧ (t > 1), A1, A2)
sm = If((t ≤ 1) ∧ (¬p) ∨ p ∧ (t > 1), s1, s2)
mT: (¬p) ∧ (t  <  0.99) ∧ (n > 6) ∨ (¬p) ∧ (t > 1) ∧ n ≟ 10 ∨ p ∧ (t  <  0.99) ∧ n ≟ 10 ∨ p ∧ (t > 1) ∧ (n > 6)
mG: (¬p) ∧ (t  <  0.99) ∧ (n > 3) ∧ (n  <  7) ∨ (¬p) ∧ (t > 1) ∧ (n ≟ 6 ∨ n ≟ 9) ∨ p ∧ (t  <  0.99) ∧ (n ≟ 6 ∨ n ≟ 9) ∨ p ∧ (t > 1) ∧ (n > 3) ∧ (n  <  7)
mS: (¬p) ∧ (t  <  0.99) ∧ (n > 1) ∧ (n  <  4) ∨ (¬p) ∧ (t > 1) ∧ (n ≟ 3 ∨ n ≟ 5 ∨ n ≟ 8) ∨ p ∧ (t  <  0.99) ∧ (n ≟ 3 ∨ n ≟ 5 ∨ n ≟ 8) ∨ p ∧ (t > 1) ∧ (n > 1) ∧ (n  <  4)
Esq1 = Corner(cisneInicio, 1)
Esq1' = Mirror(Esq1, sm)
Esq2 = Corner(cisneInicio, 2)
Esq2' = Mirror(Esq2, sm)
Esq4 = Corner(cisneInicio, 4)
Esq4' = Mirror(Esq4, sm)
Cm = Midpoint(Esq2, Esq2')
Bm = Midpoint(Esq4, Esq4')
Cm' = Mirror(Cm, Bm)
Cm'': Cm' + ((Cm' - Cm) / abs(Cm' - Cm) * abs(Esq1' - Esq1))
puntoInicio = Midpoint(Corner[cisneInicio, 1], Corner[cisneInicio, 2])
cisneInicioR = If(t ≤ 1, cisne1R, cisneMR)
angMov1: {Angle[Esq1, Cm'', Esq1'] / °, Angle[Esq2, Cm'', Esq2'] / °, Angle[Esq4, Cm'', Esq4'] / °}
angMov2 = Sequence(If[Element[angMov1, k] > 180, Element[angMov1, k] - 360, Element[angMov1, k]], k, 1, 3)
EEm1 = Rotate(Esq1, ((tm * Element[angMov2, 1]))°, Cm'')
EEm2 = Rotate(Esq2, ((tm * Element[angMov2, 2]))°, Cm'')
EEm4 = Rotate(Esq4, ((tm * Element[angMov2, 3]))°, Cm'')
rosa: (n ≟ 8 ∨ n ≟ 5) ∧ (t  <  2) ∧ (t > 0.5) ∧ (p ∨ (t > 1.5)) ∨ (n ≟ 7 ∨ n ≟ 4) ∧ (t  <  2) ∧ (t > 0.25) ∧ (p ∨ (t > 1.25)) ∨ n ≟ 3 ∧ (t  <  1.5) ∧ (t > 0.5) ∨ n ≟ 2 ∧ (t  <  1.5) ∧ (t > 0.25) ∧ (p ∨ (t  <  1.25) ∧ (t > 0.5)) ∨ n ≟ 1 ∧ (t  <  1.25) ∧ (t > 0.25)
Rastro = If(mT, Translate[puntoInicio, Vector[(tm * um)]], If[mG, Rotate[puntoInicio, ((tm * αm))°, Am], If[mS, Translate[puntoInicio, Vector[(tm * Vector[puntoInicio, Mirror[puntoInicio, sm]])]], If[tm  <  1, Translate[puntoInicio, Vector[(tm * Vector[puntoInicio, Mirror[puntoInicio, sm]])]], Translate[Mirror[puntoInicio, sm], Vector[((tm - 1) * Vector[Mirror[puntoInicio, sm], Translate[Mirror[puntoInicio, sm], um]])]]]]])
movilG = If(rosa, Rotate[cisneInicioR, (αm° * tm), Am], Rotate[cisneInicio, (αm° * tm), Am])
movilD = If(rosa, Translate[Mirror[cisneInicioR, sm], Vector[(um * (tm - 1))]], Translate[Mirror[cisneInicio, sm], Vector[(um * (tm - 1))]])
movilT = If(rosa, Translate[cisneInicioR, Vector[(um * tm)]], Translate[cisneInicio, Vector[(um * tm)]])
A = (-2.4, 1.6400000000000001)
cisne1V: cisne1
cisneMV: cisneM
cisneFV: cisneF
cisneMRV: cisneMR
cisneFRV: cisneFR
buscar = false
A3 = (3.52, -0.6)
B3 = (7.94, 1.24)
s3 = Line(A3, B3)
u3 = Vector(A3, B3)
a = 1 (slider from 1 to 4, step 1)
texto1 = If(buscar, If[a ≟ 1, "T", If[a ≟ 2, "G", If[a ≟ 3, "S", "D"]]], "")
g3 = Circle(A3, 2)
G3 = Point(g3)
γ = Angle(A3 + (2 * UnitVector[Vector[A3, B3]]), A3, G3)
γγ = Angle(A3 + (2 * UnitVector[Vector[A3, B3]]), A3, G3)
γ0 = If(γγ > 3.141592653589793, ((-γ)) / °, γ / °)
γ' = Angle(A3 + (2 * UnitVector[Vector[A3, B3]]), A3, G3)
b = Segment(A3, B3)
B = (-1.42, 5.4)
panelGoma: {Polygon[B, (x(A), y(B)), (x(A), y(B) + 10), B + (0, 10)]}
panelMenu: {Polygon[A + (0, 10), A + (-10, 10), A - (10, 20), A + (0, -20)]}
velocidad = 2 (slider from 2 to 5, step 1)
nada = 2.4 (slider from -5 to 5, step 0.1)
Titulo: (-3.4, (4 / 9 * (n - 1)) - 0.8)
titulosP: {"\fgcolor{00AACC}{T}\; \fgcolor{CCCC00}{T}", "\fgcolor{00AACC}{T}\; \fgcolor{CCCC00}{G}", "\fgcolor{00AACC}{T}\; \fgcolor{CCCC00}{S}", "\fgcolor{00AACC}{T}\; \fgcolor{CCCC00}{D}", "\fgcolor{00AACC}{G}\; \fgcolor{CCCC00}{G}", "\fgcolor{00AACC}{G}\; \fgcolor{CCCC00}{S}", "\fgcolor{00AACC}{G}\; \fgcolor{CCCC00}{D}", "\fgcolor{00AACC}{S}\; \fgcolor{CCCC00}{S}", "\fgcolor{00AACC}{S}\; \fgcolor{CCCC00}{D}", "\fgcolor{00AACC}{D}\; \fgcolor{CCCC00}{D}"}
titulo: "" + (If[p, Element[titulosP, 11 - n], Element[titulos, 11 - n]])
v: round(velocidad)
veloc: "velocidad = " + (v - 1)
cisnesB: {Translate[cisne1buscar, u3], Rotate[cisne1buscar, γ0°, A3], Mirror[cisne1buscar, s3], Translate[Mirror[cisne1buscar, s3], u3]}
cisneFbuscar = Element(cisnesB, a)