Date: 10 May 2013

w-nullcline

w-nullcline

nsegs=%v

X17_sub = (-0.28276404494382024, 0.13413329888814057)
theta1617actual = 4.900884539600077
theta1617s = Join({theta1617actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
X16_sub = (-0.2529662921348315, 0.14065462099375642)
theta1516actual = 4.869468613064179
theta1516s = Join({theta1516actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
X15_sub = (-0.2529662921348315, 0.09848340471077396)
theta1415actual = 4.806636759992384
theta1415s = Join({theta1415actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
X14_sub = (-0.28276404494382024, 0.07978894800800855)
theta1314s = Join({{0.7853981633974483, 2.356194490192345, 3.9269908169872414, 5.497787143782138}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
X13_sub = (-0.3160674157303371, 0.06326826534044841)
X12_sub = (-0.26698876404494387, 0.03500920288277977)
X11_sub = (-0.274, 0.02109704905746597)
theta1011s = Join({{0.7853981633974483, 2.356194490192345, 3.9269908169872414, 5.497787143782138}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
X10_sub = (-0.3318426966292135, 0.005011121196946892)
X9_sub = (-0.34937078651685394, -0.023247941260721758)
X8_sub = (-0.3, -0.02)
X7_sub = (-0.3633932584269663, 0.018053765408178577)
X6_sub = (-0.3668988764044944, 0.03587871249686188)
X5_sub = (-0.3668988764044944, 0.05935547207707891)
X4_sub = (-0.36514606741573036, 0.07544139993759799)
theta45s = Join({{0.7853981633974483, 2.356194490192345, 3.9269908169872414, 5.497787143782138}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
X3_sub = (-0.3406067415730337, 0.09804864990373291)
X2_sub = (-0.36865168539325843, 0.11543884218537515)
theta12actual = 0.3141592653589793
theta12s = Join({theta12actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
X1_sub = (-0.34937078651685394, 0.13500280850222268)
X0actual = (0.3, 0)
theta01actual = 0.39269908169872414
theta01s = Join({theta01actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5708, 3.141592653589793, 4.71239}})
X0_sub = (-0.4, 0.16)
snapthreshold = 0.01
X0 = DynamicCoordinates(X0_sub, If[Distance[X0_sub, X0actual]  <  snapthreshold, x(X0actual), x(X0_sub)], If[Distance[X0_sub, X0actual]  <  snapthreshold, y(X0actual), y(X0_sub)])
theta23actual = 0.47123889803846897
theta23s = Join({theta23actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
theta34actual = 1.2566370614359172
theta34s = Join({theta34actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
theta56actual = 1.7278759594743864
theta56s = Join({theta56actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
theta67actual = 1.8849555921538759
theta67s = Join({theta67actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
theta78actual = 2.356194490192345
theta78s = Join({theta78actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
theta89actual = 2.827433388230814
theta89s = Join({theta89actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
theta910actual = 2.9845130209103035
theta910s = Join({theta910actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
theta1112actual = 3.707079331235956
theta1112s = Join({theta1112actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
theta1213actual = 4.115486376202629
theta1213s = Join({theta1213actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
dvsol = 0.2
dwsol = 0.02
theta01distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X1_sub) - x(X0)) / dvsol, (y(X1_sub) - y(X0)) / dwsol)] - theta01s])
theta01 = Element(theta01s, IndexOf[Min[theta01distances], theta01distances])
X1 = DynamicCoordinates(X1_sub, x(X0) + (cos(theta01) * dvsol), y(X0) + (sin(theta01) * dwsol))
theta12distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X2_sub) - x(X1)) / dvsol, (y(X2_sub) - y(X1)) / dwsol)] - theta12s])
theta12 = Element(theta12s, IndexOf[Min[theta12distances], theta12distances])
X2 = DynamicCoordinates(X2_sub, x(X1) + (cos(theta12) * dvsol), y(X1) + (sin(theta12) * dwsol))
theta23distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X3_sub) - x(X2)) / dvsol, (y(X3_sub) - y(X2)) / dwsol)] - theta23s])
theta23 = Element(theta23s, IndexOf[Min[theta23distances], theta23distances])
X3 = DynamicCoordinates(X3_sub, x(X2) + (cos(theta23) * dvsol), y(X2) + (sin(theta23) * dwsol))
theta34distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X4_sub) - x(X3)) / dvsol, (y(X4_sub) - y(X3)) / dwsol)] - theta34s])
theta34 = Element(theta34s, IndexOf[Min[theta34distances], theta34distances])
X4 = DynamicCoordinates(X4_sub, x(X3) + (cos(theta34) * dvsol), y(X3) + (sin(theta34) * dwsol))
theta45distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X5_sub) - x(X4)) / dvsol, (y(X5_sub) - y(X4)) / dwsol)] - theta45s])
theta45 = Element(theta45s, IndexOf[Min[theta45distances], theta45distances])
X5 = DynamicCoordinates(X5_sub, x(X4) + (cos(theta45) * dvsol), y(X4) + (sin(theta45) * dwsol))
theta56distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X6_sub) - x(X5)) / dvsol, (y(X6_sub) - y(X5)) / dwsol)] - theta56s])
theta56 = Element(theta56s, IndexOf[Min[theta56distances], theta56distances])
X6 = DynamicCoordinates(X6_sub, x(X5) + (cos(theta56) * dvsol), y(X5) + (sin(theta56) * dwsol))
theta67distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X7_sub) - x(X6)) / dvsol, (y(X7_sub) - y(X6)) / dwsol)] - theta67s])
theta67 = Element(theta67s, IndexOf[Min[theta67distances], theta67distances])
X7 = DynamicCoordinates(X7_sub, x(X6) + (cos(theta67) * dvsol), y(X6) + (sin(theta67) * dwsol))
theta78distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X8_sub) - x(X7)) / dvsol, (y(X8_sub) - y(X7)) / dwsol)] - theta78s])
theta78 = Element(theta78s, IndexOf[Min[theta78distances], theta78distances])
X8 = DynamicCoordinates(X8_sub, x(X7) + (cos(theta78) * dvsol), y(X7) + (sin(theta78) * dwsol))
theta89distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X9_sub) - x(X8)) / dvsol, (y(X9_sub) - y(X8)) / dwsol)] - theta89s])
theta89 = Element(theta89s, IndexOf[Min[theta89distances], theta89distances])
X9 = DynamicCoordinates(X9_sub, x(X8) + (cos(theta89) * dvsol), y(X8) + (sin(theta89) * dwsol))
theta910distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X10_sub) - x(X9)) / dvsol, (y(X10_sub) - y(X9)) / dwsol)] - theta910s])
theta910 = Element(theta910s, IndexOf[Min[theta910distances], theta910distances])
X10 = DynamicCoordinates(X10_sub, x(X9) + (cos(theta910) * dvsol), y(X9) + (sin(theta910) * dwsol))
theta1011distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X11_sub) - x(X10)) / dvsol, (y(X11_sub) - y(X10)) / dwsol)] - theta1011s])
theta1011 = Element(theta1011s, IndexOf[Min[theta1011distances], theta1011distances])
X11 = DynamicCoordinates(X11_sub, x(X10) + (cos(theta1011) * dvsol), y(X10) + (sin(theta1011) * dwsol))
theta1112distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X12_sub) - x(X11)) / dvsol, (y(X12_sub) - y(X11)) / dwsol)] - theta1112s])
theta1112 = Element(theta1112s, IndexOf[Min[theta1112distances], theta1112distances])
X12 = DynamicCoordinates(X12_sub, x(X11) + (cos(theta1112) * dvsol), y(X11) + (sin(theta1112) * dwsol))
theta1213distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X13_sub) - x(X12)) / dvsol, (y(X13_sub) - y(X12)) / dwsol)] - theta1213s])
theta1213 = Element(theta1213s, IndexOf[Min[theta1213distances], theta1213distances])
X13 = DynamicCoordinates(X13_sub, x(X12) + (cos(theta1213) * dvsol), y(X12) + (sin(theta1213) * dwsol))
theta1314distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X14_sub) - x(X13)) / dvsol, (y(X14_sub) - y(X13)) / dwsol)] - theta1314s])
theta1314 = Element(theta1314s, IndexOf[Min[theta1314distances], theta1314distances])
X14 = DynamicCoordinates(X14_sub, x(X13) + (cos(theta1314) * dvsol), y(X13) + (sin(theta1314) * dwsol))
theta1415distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X15_sub) - x(X14)) / dvsol, (y(X15_sub) - y(X14)) / dwsol)] - theta1415s])
theta1415 = Element(theta1415s, IndexOf[Min[theta1415distances], theta1415distances])
X15 = DynamicCoordinates(X15_sub, x(X14) + (cos(theta1415) * dvsol), y(X14) + (sin(theta1415) * dwsol))
theta1516distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X16_sub) - x(X15)) / dvsol, (y(X16_sub) - y(X15)) / dwsol)] - theta1516s])
theta1516 = Element(theta1516s, IndexOf[Min[theta1516distances], theta1516distances])
X16 = DynamicCoordinates(X16_sub, x(X15) + (cos(theta1516) * dvsol), y(X15) + (sin(theta1516) * dwsol))
theta1314actual = 4.71238898038469
theta1011actual = 3.141592653589793
theta45actual = 1.5707963267948966
a = 0.2
vnullrightmaxv: (1 + a + sqrt(1 - a + a^(2))) / 3
vnull(x) = (((-x) * (x - a)) * (x - 1))
epsilon = 0.01
gamm = 2
wnull(x) = x / gamm
vmax = 1.13
vmin = -0.43
vnullrightmax: vnull(vnullrightmaxv)
wmax: (vnullrightmax * 1.6)
wmin: ((-vnullrightmax) * 0.3)
wnullinv(x) = (x * gamm)
dvdt(v, w) = (((-v) * (v - a)) * (v - 1)) - w
dwdt(v, w) = (epsilon * (v - (gamm * w)))
vecfieldmag(v, w) = sqrt((dvdt(v, w) / vmax)^(2) + (dwdt(v, w) / wmax)^(2))
dvdtnorm(v, w) = dvdt(v, w) / vecfieldmag(v, w)
dwdtnorm(v, w) = dwdt(v, w) / vecfieldmag(v, w)
v01 = 0.430629213483146
v02 = 0.5638426966292135
cubic_vnull = false
line_wnull = true
visibleregion, b, c, d, e = Polygon((vmin, wmin), (vmin, wmax), (vmax, wmax), (vmax, wmin))
A1 = PointIn(visibleregion)
A2 = PointIn(visibleregion)
A3 = PointIn(visibleregion)
A4 = PointIn(visibleregion)
ngrid = 10
dv: (vmax - vmin) / ngrid
dw: (wmax - wmin) / ngrid
vecmult = 0.9
vecdirs: (vecmult * {(dv, 0), (0, dw), ((-dv), 0), (0, (-dw)), (dv / sqrt(2), dw / sqrt(2)), (dv / sqrt(2), ((-dw)) / sqrt(2)), (((-dv)) / sqrt(2), ((-dw)) / sqrt(2)), (((-dv)) / sqrt(2), dw / sqrt(2))})
A1_h = Point(A1 + vecdirs)
A2_h = Point(A2 + vecdirs)
A3_h = Point(A3 + vecdirs)
A4_h = Point(A4 + vecdirs)
region1(x, y) = (y > vnull(x)) ∧ (y  <  wnull(x))
region2(x, y) = (y > vnull(x)) ∧ (y > wnull(x))
region3(x, y) = (y  <  vnull(x)) ∧ (y > wnull(x))
region4(x, y) = (y  <  vnull(x)) ∧ (y  <  wnull(x))
regionA1 = If(IsInRegion[A1, region1], 1, If[IsInRegion[A1, region2], 2, If[IsInRegion[A1, region3], 3, If[IsInRegion[A1, region4], 4, 0]]])
regionA2 = If(IsInRegion[A2, region1], 1, If[IsInRegion[A2, region2], 2, If[IsInRegion[A2, region3], 3, If[IsInRegion[A2, region4], 4, 0]]])
regionA3 = If(IsInRegion[A3, region1], 1, If[IsInRegion[A3, region2], 2, If[IsInRegion[A3, region3], 3, If[IsInRegion[A3, region4], 4, 0]]])
regionA4 = If(IsInRegion[A4, region1], 1, If[IsInRegion[A4, region2], 2, If[IsInRegion[A4, region3], 3, If[IsInRegion[A4, region4], 4, 0]]])
step = 1 (slider from 1 to 6, step 1)
v1 = Vector(A1, A1_h)
v2 = Vector(A2, A2_h)
v3 = Vector(A3, A3_h)
v4 = Vector(A4, A4_h)
showregionvecs: step ≥ 3
A2indifferentregion: showregionvecs ∧ (regionA2 ≠ regionA1)
A3indifferentregion: showregionvecs ∧ (regionA3 ≠ regionA1) ∧ (regionA3 ≠ regionA2)
A4indifferentregion: showregionvecs ∧ (regionA4 ≠ regionA1) ∧ (regionA4 ≠ regionA2) ∧ (regionA4 ≠ regionA3)
vector1correctangle: showregionvecs ∧ ((y(A1) > vnull(x(A1))) ∧ (x(A1_h)  <  x(A1)) ∨ (y(A1)  <  vnull(x(A1))) ∧ (x(A1_h) > x(A1))) ∧ ((y(A1) > wnull(x(A1))) ∧ (y(A1_h)  <  y(A1)) ∨ (y(A1)  <  wnull(x(A1))) ∧ (y(A1_h) > y(A1)))
vector2correctangle: showregionvecs ∧ ((y(A2) > vnull(x(A2))) ∧ (x(A2_h)  <  x(A2)) ∨ (y(A2)  <  vnull(x(A2))) ∧ (x(A2_h) > x(A2))) ∧ ((y(A2) > wnull(x(A2))) ∧ (y(A2_h)  <  y(A2)) ∨ (y(A2)  <  wnull(x(A2))) ∧ (y(A2_h) > y(A2)))
vector3correctangle: showregionvecs ∧ ((y(A3) > vnull(x(A3))) ∧ (x(A3_h)  <  x(A3)) ∨ (y(A3)  <  vnull(x(A3))) ∧ (x(A3_h) > x(A3))) ∧ ((y(A3) > wnull(x(A3))) ∧ (y(A3_h)  <  y(A3)) ∨ (y(A3)  <  wnull(x(A3))) ∧ (y(A3_h) > y(A3)))
vector4correctangle: showregionvecs ∧ ((y(A4) > vnull(x(A4))) ∧ (x(A4_h)  <  x(A4)) ∨ (y(A4)  <  vnull(x(A4))) ∧ (x(A4_h) > x(A4))) ∧ ((y(A4) > wnull(x(A4))) ∧ (y(A4_h)  <  y(A4)) ∨ (y(A4)  <  wnull(x(A4))) ∧ (y(A4_h) > y(A4)))
moveregionvecs: step ≟ 3
n_e = 0 (slider from 0 to 4, step 1)
determineequilibria: step ≟ 2
showequilibria: step ≥ 2
E1 = PointIn(visibleregion)
E2 = PointIn(visibleregion)
E3 = PointIn(visibleregion)
E4 = PointIn(visibleregion)
E1correct: showequilibria ∧ E1 ≟ (0, 0) ∧ (n_e ≥ 1)
Pvn1_sub = PointIn(visibleregion)
Pvn2_sub = PointIn(visibleregion)
Pvn2 = DynamicCoordinates(Pvn2_sub, x(Pvn2_sub), If[abs(y(Pvn2_sub) - wnull(x(Pvn2_sub)))  <  dw, Max[wmin, Min[wmax, wnull(x(Pvn2_sub))]], y(Pvn2_sub)])
Pvn1 = DynamicCoordinates(Pvn1_sub, x(Pvn1_sub), If[abs(y(Pvn1_sub) - wnull(x(Pvn1_sub)))  <  dw, Max[wmin, Min[wmax, wnull(x(Pvn1_sub))]], y(Pvn1_sub)])
nullline = Line(Pvn1, Pvn2)
determinenullclines: step ≟ 1
nulllinecorrect: nullline ≟ (y = wnull(x))
E2correct: showequilibria ∧ E2 ≟ (0, 0) ∧ (n_e ≥ 2) ∧ (E2 ≠ E1)
E3correct: showequilibria ∧ E3 ≟ (0, 0) ∧ (n_e ≥ 3) ∧ (E3 ≠ E1) ∧ (E3 ≠ E2)
E4correct: showequilibria ∧ E4 ≟ (0, 0) ∧ (n_e ≥ 4) ∧ (E4 ≠ E1) ∧ (E4 ≠ E2) ∧ (E4 ≠ E3)
nulllineendpoints: {Intersect[nullline, visibleregion]}
nulllinesegment = Segment(Element[nulllineendpoints, 1], Element[nulllineendpoints, 2])
P1onWN = Point(nulllinesegment)
P2onWN = Point(nulllinesegment)
f: x(Roots[vnull(x) - wmax, vmin, vmax])
vnullvisible = Function(vnull, x(Root[vnull(x) - wmax]), x(Root[vnull(x) - wmin]))
P1onVN = Point(vnullvisible)
P2onVN = Point(vnullvisible)
P1onWN_h = Point(P1onWN + vecdirs)
P2onWN_h = Point(P2onWN + vecdirs)
P2onVN_h = Point(P2onVN + vecdirs)
P1onVN_h = Point(P1onVN + vecdirs)
v1onVN = Vector(P1onVN, P1onVN_h)
v2onVN = Vector(P2onVN, P2onVN_h)
v2onWN = Vector(P2onWN, P2onWN_h)
v1onWN = Vector(P1onWN, P1onWN_h)
shownullvectors: step ≥ 4
vectorsVNcorrectlocations: shownullvectors ∧ ((x(P1onVN) * x(P2onVN))  <  0)
vectorsWNcorrectlocations: shownullvectors ∧ ((x(P1onWN) * x(P2onWN))  <  0)
vector1VNcorrectangle: shownullvectors ∧ x(P1onVN) ≟ x(P1onVN_h) ∧ (((y(P1onVN_h) - y(P1onVN)) * x(P1onVN)) > 0)
vector2VNcorrectangle: shownullvectors ∧ x(P2onVN) ≟ x(P2onVN_h) ∧ (((y(P2onVN_h) - y(P2onVN)) * x(P2onVN)) > 0)
vector1WNcorrectangle: shownullvectors ∧ y(P1onWN) ≟ y(P1onWN_h) ∧ (((x(P1onWN_h) - x(P1onWN)) * y(P1onWN))  <  0)
vector2WNcorrectangle: shownullvectors ∧ y(P2onWN) ≟ y(P2onWN_h) ∧ (((x(P2onWN_h) - x(P2onWN)) * y(P2onWN))  <  0)
movenullvectors: step ≟ 4
x01actual = Vector(((cos(theta01actual) * dvsol), (sin(theta01actual) * dwsol)))
X1actual: X0actual + x01actual
x12actual = Vector(((cos(theta12actual) * dvsol), (sin(theta12actual) * dwsol)))
X2actual: X1actual + x12actual
x23actual = Vector(((cos(theta23actual) * dvsol), (sin(theta23actual) * dwsol)))
X3actual: X2actual + x23actual
x34actual = Vector(((cos(theta34actual) * dvsol), (sin(theta34actual) * dwsol)))
X4actual: X3actual + x34actual
x45actual = Vector(((cos(theta45actual) * dvsol), (sin(theta45actual) * dwsol)))
X5actual: X4actual + x45actual
x56actual = Vector(((cos(theta56actual) * dvsol), (sin(theta56actual) * dwsol)))
X6actual: X5actual + x56actual
x67actual = Vector(((cos(theta67actual) * dvsol), (sin(theta67actual) * dwsol)))
X7actual: X6actual + x67actual
x78actual = Vector(((cos(theta78actual) * dvsol), (sin(theta78actual) * dwsol)))
X8actual: X7actual + x78actual
x89actual = Vector(((cos(theta89actual) * dvsol), (sin(theta89actual) * dwsol)))
X9actual: X8actual + x89actual
x910actual = Vector(((cos(theta910actual) * dvsol), (sin(theta910actual) * dwsol)))
X10actual: X9actual + x910actual
x1011actual = Vector(((cos(theta1011actual) * dvsol), (sin(theta1011actual) * dwsol)))
X11actual: X10actual + x1011actual
x1112actual = Vector(((cos(theta1112actual) * dvsol), (sin(theta1112actual) * dwsol)))
X12actual: X11actual + x1112actual
x1213actual = Vector(((cos(theta1213actual) * dvsol), (sin(theta1213actual) * dwsol)))
X13actual: X12actual + x1213actual
x1314actual = Vector(((cos(theta1314actual) * dvsol), (sin(theta1314actual) * dwsol)))
X14actual: X13actual + x1314actual
x1415actual = Vector(((cos(theta1415actual) * dvsol), (sin(theta1415actual) * dwsol)))
X15actual: X14actual + x1415actual
x1516actual = Vector(((cos(theta1516actual) * dvsol), (sin(theta1516actual) * dwsol)))
X16actual: X15actual + x1516actual
x1617actual = Vector(((cos(theta1617actual) * dvsol), (sin(theta1617actual) * dwsol)))
X18_sub = (-0.31782022471910115, 0.15630579404723444)
theta1617distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X17_sub) - x(X16)) / dvsol, (y(X17_sub) - y(X16)) / dwsol)] - theta1617s])
theta1617 = Element(theta1617s, IndexOf[Min[theta1617distances], theta1617distances])
X17actual: X16actual + x1617actual
X17 = DynamicCoordinates(X17_sub, x(X16) + (cos(theta1617) * dvsol), y(X16) + (sin(theta1617) * dwsol))
theta1718actual = 5.237034953534185
x1718actual = Vector((((cos(theta1718actual) * dvsol) * 1.01), ((sin(theta1718actual) * dwsol) * 1.01)))
X18actual: X17actual + x1718actual
theta1718s = Join({theta1718actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
theta1718distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(X18_sub) - x(X17)) / dvsol, (y(X18_sub) - y(X17)) / dwsol)] - theta1718s])
theta1718 = Element(theta1718s, IndexOf[Min[theta1718distances], theta1718distances])
X18 = DynamicCoordinates(X18_sub, x(X17) + ((cos(theta1718) * dvsol) * 1.01), y(X17) + ((sin(theta1718) * dwsol) * 1.01))
s01 = Segment(X0, X1)
s12 = Segment(X1, X2)
s23 = Segment(X2, X3)
s34 = Segment(X3, X4)
s45 = Segment(X4, X5)
s56 = Segment(X5, X6)
s67 = Segment(X6, X7)
s78 = Segment(X7, X8)
s89 = Segment(X8, X9)
s910 = Segment(X9, X10)
s1011 = Segment(X10, X11)
s1112 = Segment(X11, X12)
s1213 = Segment(X12, X13)
s1314 = Segment(X13, X14)
s1415 = Segment(X14, X15)
s1516 = Segment(X15, X16)
s1617 = Segment(X16, X17)
s1718 = Segment(X17, X18)
nsegs = 0 (slider from 0 to 18, step 1)
showtrajectory: step ≥ 6
Y0actual = (0.17, 0)
Y0_sub = (0.9845168539325843, 0.15891432288948076)
Y0 = DynamicCoordinates(Y0_sub, If[Distance[Y0_sub, Y0actual]  <  snapthreshold, x(Y0actual), x(Y0_sub)], If[Distance[Y0_sub, Y0actual]  <  snapthreshold, y(Y0actual), y(Y0_sub)])
dvsol2 = 0.08
dwsol2 = 0.016
phi01actual = 1.8849555921538759
y01actual = Vector(((cos(phi01actual) * dvsol2), (sin(phi01actual) * dwsol2)))
Y1actual: Y0actual + y01actual
Y1_sub = (0.9810112359550561, 0.14848020752049543)
phi01s = Join({phi01actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
phi01distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(Y1_sub) - x(Y0)) / dvsol2, (y(Y1_sub) - y(Y0)) / dwsol2)] - phi01s])
phi01 = Element(phi01s, IndexOf[Min[phi01distances], phi01distances])
Y1 = DynamicCoordinates(Y1_sub, x(Y0) + (cos(phi01) * dvsol2), y(Y0) + (sin(phi01) * dwsol2))
t01 = Segment(Y0, Y1)
phi12actual = 2.199114857512855
y12actual = Vector(((cos(phi12actual) * dvsol2), (sin(phi12actual) * dwsol2)))
Y2actual: Y1actual + y12actual
Y2_sub = (0.9792584269662921, 0.13413329888814057)
phi12s = Join({phi12actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
phi12distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(Y2_sub) - x(Y1)) / dvsol2, (y(Y2_sub) - y(Y1)) / dwsol2)] - phi12s])
phi12 = Element(phi12s, IndexOf[Min[phi12distances], phi12distances])
Y2 = DynamicCoordinates(Y2_sub, x(Y1) + (cos(phi12) * dvsol2), y(Y1) + (sin(phi12) * dwsol2))
t12 = Segment(Y1, Y2)
phi23actual = 3.141592653589793
y23actual = Vector(((cos(phi23actual) * dvsol2), (sin(phi23actual) * dwsol2)))
Y3actual: Y2actual + y23actual
phi23s = Join({{0.7853981633974483, 2.356194490192345, 3.9269908169872414, 5.497787143782138}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
Y3_sub = (0.977505617977528, 0.1189168806417036)
phi23distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(Y3_sub) - x(Y2)) / dvsol2, (y(Y3_sub) - y(Y2)) / dwsol2)] - phi23s])
phi23 = Element(phi23s, IndexOf[Min[phi23distances], phi23distances])
Y3 = DynamicCoordinates(Y3_sub, x(Y2) + (cos(phi23) * dvsol2), y(Y2) + (sin(phi23) * dwsol2))
t23 = Segment(Y2, Y3)
phi34actual = 3.455751918948773
y34actual = Vector(((cos(phi34actual) * dvsol2), (sin(phi34actual) * dwsol2)))
Y4actual: Y3actual + y34actual
Y4_sub = (0.9810112359550561, 0.09544012106148657)
phi34s = Join({phi34actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
phi34distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(Y4_sub) - x(Y3)) / dvsol2, (y(Y4_sub) - y(Y3)) / dwsol2)] - phi34s])
phi34 = Element(phi34s, IndexOf[Min[phi34distances], phi34distances])
Y4 = DynamicCoordinates(Y4_sub, x(Y3) + (cos(phi34) * dvsol2), y(Y3) + (sin(phi34) * dwsol2))
t34 = Segment(Y3, Y4)
phi45actual = 4.71238898038469
y45actual = Vector((((cos(phi45actual) * dvsol2) * 0.78), ((sin(phi45actual) * dwsol2) * 0.78)))
Y5actual: Y4actual + y45actual
Y5_sub = (1, 0.08)
phi45s = Join({{0.7853981633974483, 2.356194490192345, 3.9269908169872414, 5.497787143782138}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
phi45distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(Y5_sub) - x(Y4)) / dvsol2, (y(Y5_sub) - y(Y4)) / dwsol2)] - phi45s])
phi45 = Element(phi45s, IndexOf[Min[phi45distances], phi45distances])
Y5 = DynamicCoordinates(Y5_sub, x(Y4) + ((cos(phi45) * dvsol2) * 0.78), y(Y4) + ((sin(phi45) * dwsol2) * 0.78))
t45 = Segment(Y4, Y5)
phi56actual = 5.529203070318036
y56actual = Vector(((cos(phi56actual) * dvsol2), (sin(phi56actual) * dwsol2)))
Y6actual: Y5actual + y56actual
Y6_sub = (0.9950337078651684, 0.07196336148126954)
phi56s = Join({phi56actual + {0, π / 2, π, (3 * π / 2)}, {0, 1.5707963267948966, 3.141592653589793, 4.71238898038469}})
phi56distances: abs(Zip[Mod[a + π, 6.283185307179586] - π, a, Angle[((x(Y6_sub) - x(Y5)) / dvsol2, (y(Y6_sub) - y(Y5)) / dwsol2)] - phi56s])
phi56 = Element(phi56s, IndexOf[Min[phi56distances], phi56distances])
Y6 = DynamicCoordinates(Y6_sub, x(Y5) + (cos(phi56) * dvsol2), y(Y5) + (sin(phi56) * dwsol2))
t56 = Segment(Y5, Y6)
showtrajectory2: step ≥ 5
movetrajectory2: step ≟ 5
nsegs2 = 0 (slider from 0 to 6, step 1)
nEscorrect: showequilibria ∧ n_e ≟ 1
trajectory018correct0: showtrajectory2 ∧ (nsegs2 ≥ 0) ∧ Y0 ≟ Y0actual
trajectory018correct1: showtrajectory2 ∧ (nsegs2 ≥ 1) ∧ Y1 ≟ Y1actual
trajectory018correct2: showtrajectory2 ∧ (nsegs2 ≥ 2) ∧ Y2 ≟ Y2actual
trajectory018correct3: showtrajectory2 ∧ (nsegs2 ≥ 3) ∧ Y3 ≟ Y3actual
trajectory018correct4: showtrajectory2 ∧ (nsegs2 ≥ 4) ∧ Y4 ≟ Y4actual
trajectory018correct5: showtrajectory2 ∧ (nsegs2 ≥ 5) ∧ Y5 ≟ Y5actual
trajectory018correct6: showtrajectory2 ∧ (nsegs2 ≥ 6) ∧ Y6 ≟ Y6actual
trajectory03correct0: showtrajectory ∧ (nsegs ≥ 0) ∧ X0 ≟ X0actual
trajectory03correct1: showtrajectory ∧ (nsegs ≥ 1) ∧ X1 ≟ X1actual
trajectory03correct2: showtrajectory ∧ (nsegs ≥ 2) ∧ X2 ≟ X2actual
trajectory03correct3: showtrajectory ∧ (nsegs ≥ 3) ∧ X3 ≟ X3actual
trajectory03correct4: showtrajectory ∧ (nsegs ≥ 4) ∧ X4 ≟ X4actual
trajectory03correct5: showtrajectory ∧ (nsegs ≥ 5) ∧ X5 ≟ X5actual
trajectory03correct6: showtrajectory ∧ (nsegs ≥ 6) ∧ X6 ≟ X6actual
trajectory03correct7: showtrajectory ∧ (nsegs ≥ 7) ∧ X7 ≟ X7actual
trajectory03correct8: showtrajectory ∧ (nsegs ≥ 8) ∧ X8 ≟ X8actual
trajectory03correct9: showtrajectory ∧ (nsegs ≥ 9) ∧ X9 ≟ X9actual
trajectory03correct10: showtrajectory ∧ (nsegs ≥ 10) ∧ X10 ≟ X10actual
trajectory03correct11: showtrajectory ∧ (nsegs ≥ 11) ∧ X11 ≟ X11actual
trajectory03correct12: showtrajectory ∧ (nsegs ≥ 12) ∧ X12 ≟ X12actual
trajectory03correct13: showtrajectory ∧ (nsegs ≥ 13) ∧ X13 ≟ X13actual
trajectory03correct14: showtrajectory ∧ (nsegs ≥ 14) ∧ X14 ≟ X14actual
trajectory03correct15: showtrajectory ∧ (nsegs ≥ 15) ∧ X15 ≟ X15actual
trajectory03correct16: showtrajectory ∧ (nsegs ≥ 16) ∧ X16 ≟ X16actual
trajectory03correct17: showtrajectory ∧ (nsegs ≥ 17) ∧ X17 ≟ X17actual
trajectory03correct18: showtrajectory ∧ (nsegs ≥ 18) ∧ X18 ≟ X18actual