Date: 7 May 2013

x

y

show vectors

show saddle vectors

Ky: 1100
xmax = 2000
Kx: 1100
ICtol2: 5.0E-4
y0: 100
x0: 250
X0real: (x0, y0)
xmin = -200
ymax = 2000
ymin = -200
xscale: xmax - xmin
yscale: ymax - ymin
visibleregion, a, b, d, e = Polygon((xmin, ymin), (xmin, ymax), (xmax, ymax), (xmax, ymin))
X0sub = PointIn(visibleregion)
E11real = Intersect(xnullreal1, ynullreal1)
Etoly: ymax / 100
Etolx: xmax / 100
distanceE11real(s, t) = ((s - x(E11real)) / Etolx)^(2) + ((t - y(E11real)) / Etoly)^(2)
X1sub = PointIn(visibleregion)
c: 1.1
crecip: 1 / c
ynullreal2: y + x / crecip = Ky
E12real = Intersect(xnullreal1, ynullreal2)
distanceE12real(s, t) = ((s - x(E12real)) / Etolx)^(2) + ((t - y(E12real)) / Etoly)^(2)
xnullreal2: x + y / crecip = Kx
E21real = Intersect(xnullreal2, ynullreal1)
distanceE21real(s, t) = ((s - x(E21real)) / Etolx)^(2) + ((t - y(E21real)) / Etoly)^(2)
E22real = Intersect(xnullreal2, ynullreal2)
distanceE22real(s, t) = ((s - x(E22real)) / Etolx)^(2) + ((t - y(E22real)) / Etoly)^(2)
X2sub = PointIn(visibleregion)
X3sub = PointIn(visibleregion)
X4sub = PointIn(visibleregion)
X5sub = PointIn(visibleregion)
X6sub = PointIn(visibleregion)
X7sub = PointIn(visibleregion)
X8sub = PointIn(visibleregion)
step = 1 (slider from 1 to 5, step 1)
nulltol = 0.01
dynullreal1(y) = y < (nulltol * yscale) ∧ y > ((-nulltol) * yscale)
YN1P1sub = PointIn(visibleregion)
dxnullreal1(x) = x > ((-nulltol) * xscale) ∧ x < (nulltol * xscale)
dynullreal2(x, y) = y + x / crecip < Ky + ((yscale + xscale / crecip) * nulltol) ∧ y + x / crecip > Ky - ((yscale + xscale / crecip) * nulltol)
dxnullreal2(x, y) = x + (nulltol * xscale) + (y + (nulltol * yscale)) / crecip > Kx ∧ x - (nulltol * xscale) + (y - (nulltol * yscale)) / crecip < Kx
nulltol2 = 1.0E-4
YN2P2sub = PointIn(visibleregion)
YN2P1sub = PointIn(visibleregion)
YN1P2sub = PointIn(visibleregion)
XN2P2sub = PointIn(visibleregion)
XN2P1sub = PointIn(visibleregion)
XN1P2sub = PointIn(visibleregion)
XN1P1sub = PointIn(visibleregion)
E4sub = PointIn(visibleregion)
E3sub = PointIn(visibleregion)
E1sub = PointIn(visibleregion)
E2sub = PointIn(visibleregion)
entireregion(x, y) = x > 0 ∧ y > 0 ∧ x < xmax ∧ y < ymax
vecmult: 0.6
ngrid = 10
dx: (xmax - xmin) / ngrid
dy: (ymax - ymin) / ngrid
xnullhint = Function((Kx - x) / c, 0, Kx)
ynullhint = Function(Ky - (c * x), 0, Ky / c)
xlabeldisplay: "" + (LaTeX[xlabel]) + ""
ylabeldisplay: "" + (LaTeX[ylabel]) + ""
XN1P1 = DynamicCoordinates(XN1P1sub, If[IsInRegion[XN1P1sub, dxnullreal1], If[IsInRegion[XN1P1sub, dxnullreal2], x(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[XN1P1sub, dynullreal1], x(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[XN1P1sub, dynullreal2], x(Intersect[xnullreal1, ynullreal2]), x(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(XN1P1sub)) - ((x(xnullreal1) * xscale^(2)) * y(XN1P1sub))])]]], If[IsInRegion[XN1P1sub, dxnullreal2], If[IsInRegion[XN1P1sub, dynullreal1], x(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[XN1P1sub, dynullreal2], x(Intersect[xnullreal2, ynullreal2]), x(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(XN1P1sub)) - ((x(xnullreal2) * xscale^(2)) * y(XN1P1sub))])]], If[IsInRegion[XN1P1sub, dynullreal1], If[IsInRegion[XN1P1sub, dynullreal2], x(Intersect[ynullreal1, ynullreal2]), x(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(XN1P1sub)) - ((x(ynullreal1) * xscale^(2)) * y(XN1P1sub))])], If[IsInRegion[XN1P1sub, dynullreal2], x(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(XN1P1sub)) - ((x(ynullreal2) * xscale^(2)) * y(XN1P1sub))]), x(XN1P1sub)]]]], If[IsInRegion[XN1P1sub, dxnullreal1], If[IsInRegion[XN1P1sub, dxnullreal2], y(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[XN1P1sub, dynullreal1], y(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[XN1P1sub, dynullreal2], y(Intersect[xnullreal1, ynullreal2]), y(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(XN1P1sub)) - ((x(xnullreal1) * xscale^(2)) * y(XN1P1sub))])]]], If[IsInRegion[XN1P1sub, dxnullreal2], If[IsInRegion[XN1P1sub, dynullreal1], y(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[XN1P1sub, dynullreal2], y(Intersect[xnullreal2, ynullreal2]), y(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(XN1P1sub)) - ((x(xnullreal2) * xscale^(2)) * y(XN1P1sub))])]], If[IsInRegion[XN1P1sub, dynullreal1], If[IsInRegion[XN1P1sub, dynullreal2], y(Intersect[ynullreal1, ynullreal2]), y(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(XN1P1sub)) - ((x(ynullreal1) * xscale^(2)) * y(XN1P1sub))])], If[IsInRegion[XN1P1sub, dynullreal2], y(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(XN1P1sub)) - ((x(ynullreal2) * xscale^(2)) * y(XN1P1sub))]), y(XN1P1sub)]]]])
XN1P2 = DynamicCoordinates(XN1P2sub, If[IsInRegion[XN1P2sub, dxnullreal1], If[IsInRegion[XN1P2sub, dxnullreal2], x(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[XN1P2sub, dynullreal1], x(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[XN1P2sub, dynullreal2], x(Intersect[xnullreal1, ynullreal2]), x(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(XN1P2sub)) - ((x(xnullreal1) * xscale^(2)) * y(XN1P2sub))])]]], If[IsInRegion[XN1P2sub, dxnullreal2], If[IsInRegion[XN1P2sub, dynullreal1], x(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[XN1P2sub, dynullreal2], x(Intersect[xnullreal2, ynullreal2]), x(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(XN1P2sub)) - ((x(xnullreal2) * xscale^(2)) * y(XN1P2sub))])]], If[IsInRegion[XN1P2sub, dynullreal1], If[IsInRegion[XN1P2sub, dynullreal2], x(Intersect[ynullreal1, ynullreal2]), x(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(XN1P2sub)) - ((x(ynullreal1) * xscale^(2)) * y(XN1P2sub))])], If[IsInRegion[XN1P2sub, dynullreal2], x(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(XN1P2sub)) - ((x(ynullreal2) * xscale^(2)) * y(XN1P2sub))]), x(XN1P2sub)]]]], If[IsInRegion[XN1P2sub, dxnullreal1], If[IsInRegion[XN1P2sub, dxnullreal2], y(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[XN1P2sub, dynullreal1], y(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[XN1P2sub, dynullreal2], y(Intersect[xnullreal1, ynullreal2]), y(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(XN1P2sub)) - ((x(xnullreal1) * xscale^(2)) * y(XN1P2sub))])]]], If[IsInRegion[XN1P2sub, dxnullreal2], If[IsInRegion[XN1P2sub, dynullreal1], y(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[XN1P2sub, dynullreal2], y(Intersect[xnullreal2, ynullreal2]), y(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(XN1P2sub)) - ((x(xnullreal2) * xscale^(2)) * y(XN1P2sub))])]], If[IsInRegion[XN1P2sub, dynullreal1], If[IsInRegion[XN1P2sub, dynullreal2], y(Intersect[ynullreal1, ynullreal2]), y(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(XN1P2sub)) - ((x(ynullreal1) * xscale^(2)) * y(XN1P2sub))])], If[IsInRegion[XN1P2sub, dynullreal2], y(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(XN1P2sub)) - ((x(ynullreal2) * xscale^(2)) * y(XN1P2sub))]), y(XN1P2sub)]]]])
xnull1 = Line(XN1P1, XN1P2)
XN2P1 = DynamicCoordinates(XN2P1sub, If[IsInRegion[XN2P1sub, dxnullreal1], If[IsInRegion[XN2P1sub, dxnullreal2], x(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[XN2P1sub, dynullreal1], x(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[XN2P1sub, dynullreal2], x(Intersect[xnullreal1, ynullreal2]), x(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(XN2P1sub)) - ((x(xnullreal1) * xscale^(2)) * y(XN2P1sub))])]]], If[IsInRegion[XN2P1sub, dxnullreal2], If[IsInRegion[XN2P1sub, dynullreal1], x(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[XN2P1sub, dynullreal2], x(Intersect[xnullreal2, ynullreal2]), x(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(XN2P1sub)) - ((x(xnullreal2) * xscale^(2)) * y(XN2P1sub))])]], If[IsInRegion[XN2P1sub, dynullreal1], If[IsInRegion[XN2P1sub, dynullreal2], x(Intersect[ynullreal1, ynullreal2]), x(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(XN2P1sub)) - ((x(ynullreal1) * xscale^(2)) * y(XN2P1sub))])], If[IsInRegion[XN2P1sub, dynullreal2], x(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(XN2P1sub)) - ((x(ynullreal2) * xscale^(2)) * y(XN2P1sub))]), x(XN2P1sub)]]]], If[IsInRegion[XN2P1sub, dxnullreal1], If[IsInRegion[XN2P1sub, dxnullreal2], y(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[XN2P1sub, dynullreal1], y(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[XN2P1sub, dynullreal2], y(Intersect[xnullreal1, ynullreal2]), y(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(XN2P1sub)) - ((x(xnullreal1) * xscale^(2)) * y(XN2P1sub))])]]], If[IsInRegion[XN2P1sub, dxnullreal2], If[IsInRegion[XN2P1sub, dynullreal1], y(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[XN2P1sub, dynullreal2], y(Intersect[xnullreal2, ynullreal2]), y(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(XN2P1sub)) - ((x(xnullreal2) * xscale^(2)) * y(XN2P1sub))])]], If[IsInRegion[XN2P1sub, dynullreal1], If[IsInRegion[XN2P1sub, dynullreal2], y(Intersect[ynullreal1, ynullreal2]), y(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(XN2P1sub)) - ((x(ynullreal1) * xscale^(2)) * y(XN2P1sub))])], If[IsInRegion[XN2P1sub, dynullreal2], y(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(XN2P1sub)) - ((x(ynullreal2) * xscale^(2)) * y(XN2P1sub))]), y(XN2P1sub)]]]])
XN2P2 = DynamicCoordinates(XN2P2sub, If[IsInRegion[XN2P2sub, dxnullreal1], If[IsInRegion[XN2P2sub, dxnullreal2], x(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[XN2P2sub, dynullreal1], x(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[XN2P2sub, dynullreal2], x(Intersect[xnullreal1, ynullreal2]), x(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(XN2P2sub)) - ((x(xnullreal1) * xscale^(2)) * y(XN2P2sub))])]]], If[IsInRegion[XN2P2sub, dxnullreal2], If[IsInRegion[XN2P2sub, dynullreal1], x(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[XN2P2sub, dynullreal2], x(Intersect[xnullreal2, ynullreal2]), x(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(XN2P2sub)) - ((x(xnullreal2) * xscale^(2)) * y(XN2P2sub))])]], If[IsInRegion[XN2P2sub, dynullreal1], If[IsInRegion[XN2P2sub, dynullreal2], x(Intersect[ynullreal1, ynullreal2]), x(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(XN2P2sub)) - ((x(ynullreal1) * xscale^(2)) * y(XN2P2sub))])], If[IsInRegion[XN2P2sub, dynullreal2], x(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(XN2P2sub)) - ((x(ynullreal2) * xscale^(2)) * y(XN2P2sub))]), x(XN2P2sub)]]]], If[IsInRegion[XN2P2sub, dxnullreal1], If[IsInRegion[XN2P2sub, dxnullreal2], y(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[XN2P2sub, dynullreal1], y(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[XN2P2sub, dynullreal2], y(Intersect[xnullreal1, ynullreal2]), y(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(XN2P2sub)) - ((x(xnullreal1) * xscale^(2)) * y(XN2P2sub))])]]], If[IsInRegion[XN2P2sub, dxnullreal2], If[IsInRegion[XN2P2sub, dynullreal1], y(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[XN2P2sub, dynullreal2], y(Intersect[xnullreal2, ynullreal2]), y(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(XN2P2sub)) - ((x(xnullreal2) * xscale^(2)) * y(XN2P2sub))])]], If[IsInRegion[XN2P2sub, dynullreal1], If[IsInRegion[XN2P2sub, dynullreal2], y(Intersect[ynullreal1, ynullreal2]), y(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(XN2P2sub)) - ((x(ynullreal1) * xscale^(2)) * y(XN2P2sub))])], If[IsInRegion[XN2P2sub, dynullreal2], y(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(XN2P2sub)) - ((x(ynullreal2) * xscale^(2)) * y(XN2P2sub))]), y(XN2P2sub)]]]])
xnull2 = Line(XN2P2, XN2P1)
YN1P2 = DynamicCoordinates(YN1P2sub, If[IsInRegion[YN1P2sub, dxnullreal1], If[IsInRegion[YN1P2sub, dxnullreal2], x(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[YN1P2sub, dynullreal1], x(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[YN1P2sub, dynullreal2], x(Intersect[xnullreal1, ynullreal2]), x(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(YN1P2sub)) - ((x(xnullreal1) * xscale^(2)) * y(YN1P2sub))])]]], If[IsInRegion[YN1P2sub, dxnullreal2], If[IsInRegion[YN1P2sub, dynullreal1], x(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[YN1P2sub, dynullreal2], x(Intersect[xnullreal2, ynullreal2]), x(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(YN1P2sub)) - ((x(xnullreal2) * xscale^(2)) * y(YN1P2sub))])]], If[IsInRegion[YN1P2sub, dynullreal1], If[IsInRegion[YN1P2sub, dynullreal2], x(Intersect[ynullreal1, ynullreal2]), x(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(YN1P2sub)) - ((x(ynullreal1) * xscale^(2)) * y(YN1P2sub))])], If[IsInRegion[YN1P2sub, dynullreal2], x(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(YN1P2sub)) - ((x(ynullreal2) * xscale^(2)) * y(YN1P2sub))]), x(YN1P2sub)]]]], If[IsInRegion[YN1P2sub, dxnullreal1], If[IsInRegion[YN1P2sub, dxnullreal2], y(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[YN1P2sub, dynullreal1], y(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[YN1P2sub, dynullreal2], y(Intersect[xnullreal1, ynullreal2]), y(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(YN1P2sub)) - ((x(xnullreal1) * xscale^(2)) * y(YN1P2sub))])]]], If[IsInRegion[YN1P2sub, dxnullreal2], If[IsInRegion[YN1P2sub, dynullreal1], y(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[YN1P2sub, dynullreal2], y(Intersect[xnullreal2, ynullreal2]), y(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(YN1P2sub)) - ((x(xnullreal2) * xscale^(2)) * y(YN1P2sub))])]], If[IsInRegion[YN1P2sub, dynullreal1], If[IsInRegion[YN1P2sub, dynullreal2], y(Intersect[ynullreal1, ynullreal2]), y(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(YN1P2sub)) - ((x(ynullreal1) * xscale^(2)) * y(YN1P2sub))])], If[IsInRegion[YN1P2sub, dynullreal2], y(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(YN1P2sub)) - ((x(ynullreal2) * xscale^(2)) * y(YN1P2sub))]), y(YN1P2sub)]]]])
YN1P1 = DynamicCoordinates(YN1P1sub, If[IsInRegion[YN1P1sub, dxnullreal1], If[IsInRegion[YN1P1sub, dxnullreal2], x(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[YN1P1sub, dynullreal1], x(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[YN1P1sub, dynullreal2], x(Intersect[xnullreal1, ynullreal2]), x(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(YN1P1sub)) - ((x(xnullreal1) * xscale^(2)) * y(YN1P1sub))])]]], If[IsInRegion[YN1P1sub, dxnullreal2], If[IsInRegion[YN1P1sub, dynullreal1], x(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[YN1P1sub, dynullreal2], x(Intersect[xnullreal2, ynullreal2]), x(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(YN1P1sub)) - ((x(xnullreal2) * xscale^(2)) * y(YN1P1sub))])]], If[IsInRegion[YN1P1sub, dynullreal1], If[IsInRegion[YN1P1sub, dynullreal2], x(Intersect[ynullreal1, ynullreal2]), x(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(YN1P1sub)) - ((x(ynullreal1) * xscale^(2)) * y(YN1P1sub))])], If[IsInRegion[YN1P1sub, dynullreal2], x(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(YN1P1sub)) - ((x(ynullreal2) * xscale^(2)) * y(YN1P1sub))]), x(YN1P1sub)]]]], If[IsInRegion[YN1P1sub, dxnullreal1], If[IsInRegion[YN1P1sub, dxnullreal2], y(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[YN1P1sub, dynullreal1], y(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[YN1P1sub, dynullreal2], y(Intersect[xnullreal1, ynullreal2]), y(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(YN1P1sub)) - ((x(xnullreal1) * xscale^(2)) * y(YN1P1sub))])]]], If[IsInRegion[YN1P1sub, dxnullreal2], If[IsInRegion[YN1P1sub, dynullreal1], y(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[YN1P1sub, dynullreal2], y(Intersect[xnullreal2, ynullreal2]), y(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(YN1P1sub)) - ((x(xnullreal2) * xscale^(2)) * y(YN1P1sub))])]], If[IsInRegion[YN1P1sub, dynullreal1], If[IsInRegion[YN1P1sub, dynullreal2], y(Intersect[ynullreal1, ynullreal2]), y(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(YN1P1sub)) - ((x(ynullreal1) * xscale^(2)) * y(YN1P1sub))])], If[IsInRegion[YN1P1sub, dynullreal2], y(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(YN1P1sub)) - ((x(ynullreal2) * xscale^(2)) * y(YN1P1sub))]), y(YN1P1sub)]]]])
ynull1 = Line(YN1P2, YN1P1)
YN2P1 = DynamicCoordinates(YN2P1sub, If[IsInRegion[YN2P1sub, dxnullreal1], If[IsInRegion[YN2P1sub, dxnullreal2], x(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[YN2P1sub, dynullreal1], x(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[YN2P1sub, dynullreal2], x(Intersect[xnullreal1, ynullreal2]), x(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(YN2P1sub)) - ((x(xnullreal1) * xscale^(2)) * y(YN2P1sub))])]]], If[IsInRegion[YN2P1sub, dxnullreal2], If[IsInRegion[YN2P1sub, dynullreal1], x(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[YN2P1sub, dynullreal2], x(Intersect[xnullreal2, ynullreal2]), x(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(YN2P1sub)) - ((x(xnullreal2) * xscale^(2)) * y(YN2P1sub))])]], If[IsInRegion[YN2P1sub, dynullreal1], If[IsInRegion[YN2P1sub, dynullreal2], x(Intersect[ynullreal1, ynullreal2]), x(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(YN2P1sub)) - ((x(ynullreal1) * xscale^(2)) * y(YN2P1sub))])], If[IsInRegion[YN2P1sub, dynullreal2], x(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(YN2P1sub)) - ((x(ynullreal2) * xscale^(2)) * y(YN2P1sub))]), x(YN2P1sub)]]]], If[IsInRegion[YN2P1sub, dxnullreal1], If[IsInRegion[YN2P1sub, dxnullreal2], y(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[YN2P1sub, dynullreal1], y(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[YN2P1sub, dynullreal2], y(Intersect[xnullreal1, ynullreal2]), y(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(YN2P1sub)) - ((x(xnullreal1) * xscale^(2)) * y(YN2P1sub))])]]], If[IsInRegion[YN2P1sub, dxnullreal2], If[IsInRegion[YN2P1sub, dynullreal1], y(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[YN2P1sub, dynullreal2], y(Intersect[xnullreal2, ynullreal2]), y(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(YN2P1sub)) - ((x(xnullreal2) * xscale^(2)) * y(YN2P1sub))])]], If[IsInRegion[YN2P1sub, dynullreal1], If[IsInRegion[YN2P1sub, dynullreal2], y(Intersect[ynullreal1, ynullreal2]), y(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(YN2P1sub)) - ((x(ynullreal1) * xscale^(2)) * y(YN2P1sub))])], If[IsInRegion[YN2P1sub, dynullreal2], y(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(YN2P1sub)) - ((x(ynullreal2) * xscale^(2)) * y(YN2P1sub))]), y(YN2P1sub)]]]])
YN2P2 = DynamicCoordinates(YN2P2sub, If[IsInRegion[YN2P2sub, dxnullreal1], If[IsInRegion[YN2P2sub, dxnullreal2], x(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[YN2P2sub, dynullreal1], x(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[YN2P2sub, dynullreal2], x(Intersect[xnullreal1, ynullreal2]), x(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(YN2P2sub)) - ((x(xnullreal1) * xscale^(2)) * y(YN2P2sub))])]]], If[IsInRegion[YN2P2sub, dxnullreal2], If[IsInRegion[YN2P2sub, dynullreal1], x(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[YN2P2sub, dynullreal2], x(Intersect[xnullreal2, ynullreal2]), x(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(YN2P2sub)) - ((x(xnullreal2) * xscale^(2)) * y(YN2P2sub))])]], If[IsInRegion[YN2P2sub, dynullreal1], If[IsInRegion[YN2P2sub, dynullreal2], x(Intersect[ynullreal1, ynullreal2]), x(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(YN2P2sub)) - ((x(ynullreal1) * xscale^(2)) * y(YN2P2sub))])], If[IsInRegion[YN2P2sub, dynullreal2], x(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(YN2P2sub)) - ((x(ynullreal2) * xscale^(2)) * y(YN2P2sub))]), x(YN2P2sub)]]]], If[IsInRegion[YN2P2sub, dxnullreal1], If[IsInRegion[YN2P2sub, dxnullreal2], y(Intersect[xnullreal1, xnullreal2]), If[IsInRegion[YN2P2sub, dynullreal1], y(Intersect[xnullreal1, ynullreal1]), If[IsInRegion[YN2P2sub, dynullreal2], y(Intersect[xnullreal1, ynullreal2]), y(Intersect[xnullreal1, ((y(xnullreal1) * yscale^(2)) * x) - ((x(xnullreal1) * xscale^(2)) * y) = ((y(xnullreal1) * yscale^(2)) * x(YN2P2sub)) - ((x(xnullreal1) * xscale^(2)) * y(YN2P2sub))])]]], If[IsInRegion[YN2P2sub, dxnullreal2], If[IsInRegion[YN2P2sub, dynullreal1], y(Intersect[xnullreal2, ynullreal1]), If[IsInRegion[YN2P2sub, dynullreal2], y(Intersect[xnullreal2, ynullreal2]), y(Intersect[xnullreal2, ((y(xnullreal2) * yscale^(2)) * x) - ((x(xnullreal2) * xscale^(2)) * y) = ((y(xnullreal2) * yscale^(2)) * x(YN2P2sub)) - ((x(xnullreal2) * xscale^(2)) * y(YN2P2sub))])]], If[IsInRegion[YN2P2sub, dynullreal1], If[IsInRegion[YN2P2sub, dynullreal2], y(Intersect[ynullreal1, ynullreal2]), y(Intersect[ynullreal1, ((y(ynullreal1) * yscale^(2)) * x) - ((x(ynullreal1) * xscale^(2)) * y) = ((y(ynullreal1) * yscale^(2)) * x(YN2P2sub)) - ((x(ynullreal1) * xscale^(2)) * y(YN2P2sub))])], If[IsInRegion[YN2P2sub, dynullreal2], y(Intersect[ynullreal2, ((y(ynullreal2) * yscale^(2)) * x) - ((x(ynullreal2) * xscale^(2)) * y) = ((y(ynullreal2) * yscale^(2)) * x(YN2P2sub)) - ((x(ynullreal2) * xscale^(2)) * y(YN2P2sub))]), y(YN2P2sub)]]]])
ynull2 = Line(YN2P1, YN2P2)
P1onXN1 = Point(xnull1)
vecdirs: (vecmult * {(dx, 0), (0, dy), ((-dx), 0), (0, (-dy)), (dx / sqrt(2), dy / sqrt(2)), (dx / sqrt(2), ((-dy)) / sqrt(2)), (((-dx)) / sqrt(2), ((-dy)) / sqrt(2)), (((-dx)) / sqrt(2), dy / sqrt(2))})
P2onXN1 = Point(xnull1)
P2onXN1_h = Point(P2onXN1 + vecdirs)
v2onXN1 = Vector(P2onXN1, P2onXN1_h)
P1onXN1_h = Point(P1onXN1 + vecdirs)
v1onXN1 = Vector(P1onXN1, P1onXN1_h)
P1onXN2 = Point(xnull2)
P2onXN2 = Point(xnull2)
P2onXN2_h = Point(P2onXN2 + vecdirs)
P1onXN2_h = Point(P1onXN2 + vecdirs)
v1onXN2 = Vector(P1onXN2, P1onXN2_h)
v2onXN2 = Vector(P2onXN2, P2onXN2_h)
P1onYN1 = Point(ynull1)
P2onYN1 = Point(ynull1)
P1onYN2 = Point(ynull2)
P2onYN2 = Point(ynull2)
P1onYN1_h = Point(P1onYN1 + vecdirs)
P2onYN1_h = Point(P2onYN1 + vecdirs)
P1onYN2_h = Point(P1onYN2 + vecdirs)
P2onYN2_h = Point(P2onYN2 + vecdirs)
v1onYN1 = Vector(P1onYN1, P1onYN1_h)
v2onYN1 = Vector(P2onYN1, P2onYN1_h)
v1onYN2 = Vector(P1onYN2, P1onYN2_h)
v2onYN2 = Vector(P2onYN2, P2onYN2_h)
fx(x, y) = (x * (1 - (x + y / crecip) / Kx))
fy(x, y) = (y * (1 - (y + x / crecip) / Ky))
n_e = 0 (slider from 0 to 4, step 1)
E1 = DynamicCoordinates(E1sub, If[distanceE11real(E1sub) < 1, x(E11real), If[distanceE12real(E1sub) < 1, x(E12real), If[distanceE21real(E1sub) < 1, x(E21real), If[distanceE22real(E1sub) < 1, x(E22real), x(E1sub)]]]], If[distanceE11real(E1sub) < 1, y(E11real), If[distanceE12real(E1sub) < 1, y(E12real), If[distanceE21real(E1sub) < 1, y(E21real), If[distanceE22real(E1sub) < 1, y(E22real), y(E1sub)]]]])
E2 = DynamicCoordinates(E2sub, If[distanceE11real(E2sub) < 1, x(E11real), If[distanceE12real(E2sub) < 1, x(E12real), If[distanceE21real(E2sub) < 1, x(E21real), If[distanceE22real(E2sub) < 1, x(E22real), x(E2sub)]]]], If[distanceE11real(E2sub) < 1, y(E11real), If[distanceE12real(E2sub) < 1, y(E12real), If[distanceE21real(E2sub) < 1, y(E21real), If[distanceE22real(E2sub) < 1, y(E22real), y(E2sub)]]]])
E4 = DynamicCoordinates(E4sub, If[distanceE11real(E4sub) < 1, x(E11real), If[distanceE12real(E4sub) < 1, x(E12real), If[distanceE21real(E4sub) < 1, x(E21real), If[distanceE22real(E4sub) < 1, x(E22real), x(E4sub)]]]], If[distanceE11real(E4sub) < 1, y(E11real), If[distanceE12real(E4sub) < 1, y(E12real), If[distanceE21real(E4sub) < 1, y(E21real), If[distanceE22real(E4sub) < 1, y(E22real), y(E4sub)]]]])
E3 = DynamicCoordinates(E3sub, If[distanceE11real(E3sub) < 1, x(E11real), If[distanceE12real(E3sub) < 1, x(E12real), If[distanceE21real(E3sub) < 1, x(E21real), If[distanceE22real(E3sub) < 1, x(E22real), x(E3sub)]]]], If[distanceE11real(E3sub) < 1, y(E11real), If[distanceE12real(E3sub) < 1, y(E12real), If[distanceE21real(E3sub) < 1, y(E21real), If[distanceE22real(E3sub) < 1, y(E22real), y(E3sub)]]]])
NrealEs = If(x(E22real) > 0 ∧ y(E22real) > 0, 4, 3)
boundary = PolyLine((0, 0), (xmax, 0), (xmax, ymax), (0, ymax), (0, 0))
xnull1boundary: {Intersect[xnull1, boundary]}
xnull2boundary: {Intersect[xnull2, boundary]}
ynull2boundary: {Intersect[ynull2, boundary]}
ynull1boundary: {Intersect[ynull1, boundary]}
fxzeroshift(x, y) = ((x + 1.0E-4) * (1 - (x + y / crecip) / Kx))
fyzeroshift(x, y) = ((y + 1.0E-4) * (1 - (y + x / crecip) / Ky))
shownullclinevecs: step ≥ 4
twopointsxnull1: (fyzeroshift(Element[xnull1boundary, 1]) * fyzeroshift(Element[xnull1boundary, 2])) < 0
twopointsxnull2: (fyzeroshift(Element[xnull2boundary, 1]) * fyzeroshift(Element[xnull2boundary, 2])) < 0
twopointsynull1: (fxzeroshift(Element[ynull1boundary, 1]) * fxzeroshift(Element[ynull1boundary, 2])) < 0
twopointsynull2: (fxzeroshift(Element[ynull2boundary, 1]) * fxzeroshift(Element[ynull2boundary, 2])) < 0
fourEs: x(E22real) > 0 ∧ y(E22real) > 0
xnullreal1boundary: {Intersect[xnullreal1, boundary]}
xnullreal2boundary: {Intersect[xnullreal2, boundary]}
ynullreal1boundary: {Intersect[ynullreal1, boundary]}
ynullreal2boundary: {Intersect[ynullreal2, boundary]}
shownullhints = true
region1(x, y) = x > 0 ∧ y > 0 ∧ x + y / crecip < Kx ∧ y + x / crecip < Ky
A1 = PointIn(visibleregion)
A2 = PointIn(visibleregion)
A3 = PointIn(visibleregion)
A4 = PointIn(visibleregion)
region2(x, y) = x > 0 ∧ y > 0 ∧ x + y / crecip > Kx ∧ y + x / crecip < Ky
region3(x, y) = x > 0 ∧ y > 0 ∧ x + y / crecip < Kx ∧ y + x / crecip > Ky
region4(x, y) = x > 0 ∧ y > 0 ∧ x + y / crecip > Kx ∧ y + x / crecip > Ky
A1_h = Point(A1 + vecdirs)
A2_h = Point(A2 + vecdirs)
A3_h = Point(A3 + vecdirs)
A4_h = Point(A4 + vecdirs)
v1 = Vector(A1, A1_h)
v2 = Vector(A2, A2_h)
v3 = Vector(A3, A3_h)
v4 = Vector(A4, A4_h)
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]]])
xnullreal2yint: (Kx * crecip)
xnullreal2xint: Kx
ynullreal2yint: Ky
ynullreal2xint: (Ky * crecip)
tol: (xmax + ymax) / 10000000000
xnull1isxnullreal1: abs((x(xnull1) * y(xnullreal1)) - (x(xnullreal1) * y(xnull1))) + abs((x(xnull1) * z(xnullreal1)) - (x(xnullreal1) * z(xnull1))) < tol ∧ Defined[xnull1]
xnull1isxnullreal2: abs((x(xnull1) * y(xnullreal2)) - (x(xnullreal2) * y(xnull1))) + abs((x(xnull1) * z(xnullreal2)) - (x(xnullreal2) * z(xnull1))) < tol ∧ Defined[xnull1]
xnull2isxnullreal2: abs((x(xnull2) * y(xnullreal2)) - (x(xnullreal2) * y(xnull2))) + abs((x(xnull2) * z(xnullreal2)) - (x(xnullreal2) * z(xnull2))) < tol ∧ Defined[xnull2]
xnull2isxnullreal1: abs((x(xnull2) * y(xnullreal1)) - (x(xnullreal1) * y(xnull2))) + abs((x(xnull2) * z(xnullreal1)) - (x(xnullreal1) * z(xnull2))) < tol ∧ Defined[xnull2]
xnull2isxnull1orundefined: abs((x(xnull1) * y(xnull2)) - (x(xnull2) * y(xnull1))) + abs((x(xnull1) * z(xnull2)) - (x(xnull2) * z(xnull1))) < tol
xnull1correct: xnull1isxnullreal1 ∨ xnull1isxnullreal2
xnull2correct: (xnull2isxnullreal1 ∨ xnull2isxnullreal2) ∧ (¬xnull2isxnull1orundefined)
ynull1isynullreal2: abs((x(ynull1) * y(ynullreal2)) - (x(ynullreal2) * y(ynull1))) + abs((x(ynull1) * z(ynullreal2)) - (x(ynullreal2) * z(ynull1))) < tol ∧ Defined[ynull1]
ynull1isynullreal1: abs((x(ynull1) * y(ynullreal1)) - (x(ynullreal1) * y(ynull1))) + abs((x(ynull1) * z(ynullreal1)) - (x(ynullreal1) * z(ynull1))) < tol ∧ Defined[ynull1]
ynull2isynullreal1: abs((x(ynull2) * y(ynullreal1)) - (x(ynullreal1) * y(ynull2))) + abs((x(ynull2) * z(ynullreal1)) - (x(ynullreal1) * z(ynull2))) < tol ∧ Defined[ynull2]
ynull2isynullreal2: abs((x(ynull2) * y(ynullreal2)) - (x(ynullreal2) * y(ynull2))) + abs((x(ynull2) * z(ynullreal2)) - (x(ynullreal2) * z(ynull2))) < tol ∧ Defined[ynull2]
ynull2isynull1orundefined: abs((x(ynull1) * y(ynull2)) - (x(ynull2) * y(ynull1))) + abs((x(ynull1) * z(ynull2)) - (x(ynull2) * z(ynull1))) < tol
ynull1correct: ynull1isynullreal1 ∨ ynull1isynullreal2
ynull2correct: (ynull2isynullreal1 ∨ ynull2isynullreal2) ∧ (¬ynull2isynull1orundefined)
shownullhandles: step ≟ 1
moveEs: step ≟ 2
showregionvecs: step ≥ 3
moveregionvecs: step ≟ 3
X0 = DynamicCoordinates(X0sub, If[((x(X0sub) - x(X0real)) / xscale)^(2) + ((y(X0sub) - y(X0real)) / yscale)^(2) < ICtol2, x(X0real), x(X0sub)], If[((x(X0sub) - x(X0real)) / xscale)^(2) + ((y(X0sub) - y(X0real)) / yscale)^(2) < ICtol2, y(X0real), y(X0sub)])
movenullclinevecs: step ≟ 4
X1 = DynamicCoordinates(X1sub, If[distanceE11real(X1sub) < 1, x(E11real), If[distanceE12real(X1sub) < 1, x(E12real), If[distanceE21real(X1sub) < 1, x(E21real), If[distanceE22real(X1sub) < 1, x(E22real), x(X1sub)]]]], If[distanceE11real(X1sub) < 1, y(E11real), If[distanceE12real(X1sub) < 1, y(E12real), If[distanceE21real(X1sub) < 1, y(E21real), If[distanceE22real(X1sub) < 1, y(E22real), y(X1sub)]]]])
X2 = DynamicCoordinates(X2sub, If[distanceE11real(X2sub) < 1, x(E11real), If[distanceE12real(X2sub) < 1, x(E12real), If[distanceE21real(X2sub) < 1, x(E21real), If[distanceE22real(X2sub) < 1, x(E22real), x(X2sub)]]]], If[distanceE11real(X2sub) < 1, y(E11real), If[distanceE12real(X2sub) < 1, y(E12real), If[distanceE21real(X2sub) < 1, y(E21real), If[distanceE22real(X2sub) < 1, y(E22real), y(X2sub)]]]])
X3 = DynamicCoordinates(X3sub, If[distanceE11real(X3sub) < 1, x(E11real), If[distanceE12real(X3sub) < 1, x(E12real), If[distanceE21real(X3sub) < 1, x(E21real), If[distanceE22real(X3sub) < 1, x(E22real), x(X3sub)]]]], If[distanceE11real(X3sub) < 1, y(E11real), If[distanceE12real(X3sub) < 1, y(E12real), If[distanceE21real(X3sub) < 1, y(E21real), If[distanceE22real(X3sub) < 1, y(E22real), y(X3sub)]]]])
X4 = DynamicCoordinates(X4sub, If[distanceE11real(X4sub) < 1, x(E11real), If[distanceE12real(X4sub) < 1, x(E12real), If[distanceE21real(X4sub) < 1, x(E21real), If[distanceE22real(X4sub) < 1, x(E22real), x(X4sub)]]]], If[distanceE11real(X4sub) < 1, y(E11real), If[distanceE12real(X4sub) < 1, y(E12real), If[distanceE21real(X4sub) < 1, y(E21real), If[distanceE22real(X4sub) < 1, y(E22real), y(X4sub)]]]])
X5 = DynamicCoordinates(X5sub, If[distanceE11real(X5sub) < 1, x(E11real), If[distanceE12real(X5sub) < 1, x(E12real), If[distanceE21real(X5sub) < 1, x(E21real), If[distanceE22real(X5sub) < 1, x(E22real), x(X5sub)]]]], If[distanceE11real(X5sub) < 1, y(E11real), If[distanceE12real(X5sub) < 1, y(E12real), If[distanceE21real(X5sub) < 1, y(E21real), If[distanceE22real(X5sub) < 1, y(E22real), y(X5sub)]]]])
X6 = DynamicCoordinates(X6sub, If[distanceE11real(X6sub) < 1, x(E11real), If[distanceE12real(X6sub) < 1, x(E12real), If[distanceE21real(X6sub) < 1, x(E21real), If[distanceE22real(X6sub) < 1, x(E22real), x(X6sub)]]]], If[distanceE11real(X6sub) < 1, y(E11real), If[distanceE12real(X6sub) < 1, y(E12real), If[distanceE21real(X6sub) < 1, y(E21real), If[distanceE22real(X6sub) < 1, y(E22real), y(X6sub)]]]])
X7 = DynamicCoordinates(X7sub, If[distanceE11real(X7sub) < 1, x(E11real), If[distanceE12real(X7sub) < 1, x(E12real), If[distanceE21real(X7sub) < 1, x(E21real), If[distanceE22real(X7sub) < 1, x(E22real), x(X7sub)]]]], If[distanceE11real(X7sub) < 1, y(E11real), If[distanceE12real(X7sub) < 1, y(E12real), If[distanceE21real(X7sub) < 1, y(E21real), If[distanceE22real(X7sub) < 1, y(E22real), y(X7sub)]]]])
X8 = DynamicCoordinates(X8sub, If[distanceE11real(X8sub) < 1, x(E11real), If[distanceE12real(X8sub) < 1, x(E12real), If[distanceE21real(X8sub) < 1, x(E21real), If[distanceE22real(X8sub) < 1, x(E22real), x(X8sub)]]]], If[distanceE11real(X8sub) < 1, y(E11real), If[distanceE12real(X8sub) < 1, y(E12real), If[distanceE21real(X8sub) < 1, y(E21real), If[distanceE22real(X8sub) < 1, y(E22real), y(X8sub)]]]])
s1 = Segment(X0, X1)
s2 = Segment(X1, X2)
s3 = Segment(X2, X3)
s4 = Segment(X3, X4)
s5 = Segment(X4, X5)
s6 = Segment(X5, X6)
s7 = Segment(X6, X7)
s8 = Segment(X7, X8)
nsegs = 1 (slider from 1 to 8, step 1)
xtol = 0.01
trajtol = 0.01
s8xcorrect = If(nsegs > 7, If[fx(X7) < 0, If[fx(X8) ≤ 0, x(X8) ≤ x(X7), abs(x(X8) - x(X7)) < (trajtol * xscale)], If[fx(X8) ≥ 0, x(X8) ≥ x(X7), abs(x(X8) - x(X7)) < (trajtol * xscale)]], true)
s8ycorrect = If(nsegs > 7, If[fy(X7) < 0, If[fy(X8) ≤ 0, y(X8) ≤ y(X7), abs(y(X8) - y(X7)) < (trajtol * yscale)], If[fy(X8) ≥ 0, y(X8) ≥ y(X7), abs(y(X8) - y(X7)) < (trajtol * yscale)]], true)
s1xcorrect = If(fx(X0) < 0, If[fx(X1) ≤ 0, x(X1) ≤ x(X0), abs(x(X1) - x(X0)) < (trajtol * xscale)], If[fx(X1) ≥ 0, x(X1) ≥ x(X0), abs(x(X1) - x(X0)) < (trajtol * xscale)])
s1ycorrect = If(fy(X0) < 0, If[fy(X1) ≤ 0, y(X1) ≤ y(X0), abs(y(X1) - y(X0)) < (trajtol * yscale)], If[fy(X1) ≥ 0, y(X1) ≥ y(X0), abs(y(X1) - y(X0)) < (trajtol * yscale)])
s2xcorrect = If(nsegs > 1, If[fx(X1) < 0, If[fx(X2) ≤ 0, x(X2) ≤ x(X1), abs(x(X2) - x(X1)) < (trajtol * xscale)], If[fx(X2) ≥ 0, x(X2) ≥ x(X1), abs(x(X2) - x(X1)) < (trajtol * xscale)]], true)
s2ycorrect = If(nsegs > 1, If[fy(X1) < 0, If[fy(X2) ≤ 0, y(X2) ≤ y(X1), abs(y(X2) - y(X1)) < (trajtol * yscale)], If[fy(X2) ≥ 0, y(X2) ≥ y(X1), abs(y(X2) - y(X1)) < (trajtol * yscale)]], true)
s3xcorrect = If(nsegs > 2, If[fx(X2) < 0, If[fx(X3) ≤ 0, x(X3) ≤ x(X2), abs(x(X3) - x(X2)) < (trajtol * xscale)], If[fx(X3) ≥ 0, x(X3) ≥ x(X2), abs(x(X3) - x(X2)) < (trajtol * xscale)]], true)
s3ycorrect = If(nsegs > 2, If[fy(X2) < 0, If[fy(X3) ≤ 0, y(X3) ≤ y(X2), abs(y(X3) - y(X2)) < (trajtol * yscale)], If[fy(X3) ≥ 0, y(X3) ≥ y(X2), abs(y(X3) - y(X2)) < (trajtol * yscale)]], true)
s4xcorrect = If(nsegs > 3, If[fx(X3) < 0, If[fx(X4) ≤ 0, x(X4) ≤ x(X3), abs(x(X4) - x(X3)) < (trajtol * xscale)], If[fx(X4) ≥ 0, x(X4) ≥ x(X3), abs(x(X4) - x(X3)) < (trajtol * xscale)]], true)
s4ycorrect = If(nsegs > 3, If[fy(X3) < 0, If[fy(X4) ≤ 0, y(X4) ≤ y(X3), abs(y(X4) - y(X3)) < (trajtol * yscale)], If[fy(X4) ≥ 0, y(X4) ≥ y(X3), abs(y(X4) - y(X3)) < (trajtol * yscale)]], true)
s5xcorrect = If(nsegs > 4, If[fx(X4) < 0, If[fx(X5) ≤ 0, x(X5) ≤ x(X4), abs(x(X5) - x(X4)) < (trajtol * xscale)], If[fx(X5) ≥ 0, x(X5) ≥ x(X4), abs(x(X5) - x(X4)) < (trajtol * xscale)]], true)
s5ycorrect = If(nsegs > 4, If[fy(X4) < 0, If[fy(X5) ≤ 0, y(X5) ≤ y(X4), abs(y(X5) - y(X4)) < (trajtol * yscale)], If[fy(X5) ≥ 0, y(X5) ≥ y(X4), abs(y(X5) - y(X4)) < (trajtol * yscale)]], true)
s6xcorrect = If(nsegs > 5, If[fx(X5) < 0, If[fx(X6) ≤ 0, x(X6) ≤ x(X5), abs(x(X6) - x(X5)) < (trajtol * xscale)], If[fx(X6) ≥ 0, x(X6) ≥ x(X5), abs(x(X6) - x(X5)) < (trajtol * xscale)]], true)
s6ycorrect = If(nsegs > 5, If[fy(X5) < 0, If[fy(X6) ≤ 0, y(X6) ≤ y(X5), abs(y(X6) - y(X5)) < (trajtol * yscale)], If[fy(X6) ≥ 0, y(X6) ≥ y(X5), abs(y(X6) - y(X5)) < (trajtol * yscale)]], true)
s7xcorrect = If(nsegs > 6, If[fx(X6) < 0, If[fx(X7) ≤ 0, x(X7) ≤ x(X6), abs(x(X7) - x(X6)) < (trajtol * xscale)], If[fx(X7) ≥ 0, x(X7) ≥ x(X6), abs(x(X7) - x(X6)) < (trajtol * xscale)]], true)
s7ycorrect = If(nsegs > 6, If[fy(X6) < 0, If[fy(X7) ≤ 0, y(X7) ≤ y(X6), abs(y(X7) - y(X6)) < (trajtol * yscale)], If[fy(X7) ≥ 0, y(X7) ≥ y(X6), abs(y(X7) - y(X6)) < (trajtol * yscale)]], true)
Xn = If(nsegs ≟ 1, X1, If[nsegs ≟ 2, X2, If[nsegs ≟ 3, X3, If[nsegs ≟ 4, X4, If[nsegs ≟ 5, X5, If[nsegs ≟ 6, X6, If[nsegs ≟ 7, X7, X8]]]]]])
stableEs = If(fourEs, If[c ≥ 1, {E21real, E12real}, {E22real}], If[c ≥ 1, If[Kx > Ky, {E21real}, {E12real}], If[x(E22real) ≤ 0, {E12real}, {E21real}]])
dt = 0.3
validtrajectory: step ≥ 5 ∧ s1xcorrect ∧ s1ycorrect ∧ s2xcorrect ∧ s2ycorrect ∧ s3xcorrect ∧ s3ycorrect ∧ s4xcorrect ∧ s4ycorrect ∧ s5xcorrect ∧ s5ycorrect ∧ s6xcorrect ∧ s6ycorrect ∧ s7xcorrect ∧ s7ycorrect ∧ s8xcorrect ∧ s8ycorrect
correctinitial: step ≥ 5 ∧ X0 ≟ X0real
vector2XN1correctangle: step ≥ 4 ∧ If[twopointsxnull1, fy(P2onXN1) > 0 ∧ P2onXN1_h ≟ P2onXN1 + (0, (dy * vecmult)) ∨ fy(P2onXN1) < 0 ∧ P2onXN1_h ≟ P2onXN1 + (0, ((-dy) * vecmult)), true]
vector2XN2correctangle: step ≥ 4 ∧ If[twopointsxnull2, fy(P2onXN2) > 0 ∧ P2onXN2_h ≟ P2onXN2 + (0, (dy * vecmult)) ∨ fy(P2onXN2) < 0 ∧ P2onXN2_h ≟ P2onXN2 + (0, ((-dy) * vecmult)), true]
vector2YN1correctangle: step ≥ 4 ∧ If[twopointsynull1, fx(P2onYN1) > 0 ∧ P2onYN1_h ≟ P2onYN1 + ((dx * vecmult), 0) ∨ fx(P2onYN1) < 0 ∧ P2onYN1_h ≟ P2onYN1 + (((-dx) * vecmult), 0), true]
vector2YN2correctangle: step ≥ 4 ∧ If[twopointsynull2, fx(P2onYN2) > 0 ∧ P2onYN2_h ≟ P2onYN2 + ((dx * vecmult), 0) ∨ fx(P2onYN2) < 0 ∧ P2onYN2_h ≟ P2onYN2 + (((-dx) * vecmult), 0), true]
vectorsXN1correctlocations: step ≥ 4 ∧ If[twopointsxnull1, (fy(P1onXN1) * fy(P2onXN1)) < 0 ∧ x(P1onXN1) ≥ 0 ∧ x(P2onXN1) ≥ 0 ∧ y(P1onXN1) ≥ 0 ∧ y(P2onXN1) ≥ 0, x(P1onXN1) ≥ 0 ∧ y(P1onXN1) ≥ 0]
vectorsXN2correctlocations: step ≥ 4 ∧ If[twopointsxnull2, (fy(P1onXN2) * fy(P2onXN2)) < 0 ∧ x(P1onXN2) ≥ 0 ∧ x(P2onXN2) ≥ 0 ∧ y(P1onXN2) ≥ 0 ∧ y(P2onXN2) ≥ 0, x(P1onXN2) ≥ 0 ∧ y(P1onXN2) ≥ 0]
vectorsYN1correctlocations: step ≥ 4 ∧ If[twopointsynull1, (fx(P1onYN1) * fx(P2onYN1)) < 0 ∧ x(P1onYN1) ≥ 0 ∧ x(P2onYN1) ≥ 0 ∧ y(P1onYN1) ≥ 0 ∧ y(P2onYN1) ≥ 0, x(P1onYN1) ≥ 0 ∧ y(P1onYN1) ≥ 0]
vectorsYN2correctlocations: step ≥ 4 ∧ If[twopointsynull2, (fx(P1onYN2) * fx(P2onYN2)) < 0 ∧ x(P1onYN2) ≥ 0 ∧ x(P2onYN2) ≥ 0 ∧ y(P1onYN2) ≥ 0 ∧ y(P2onYN2) ≥ 0, x(P1onYN2) ≥ 0 ∧ y(P1onYN2) ≥ 0]
vector1correctangle: step ≥ 3 ∧ If[fx(A1) > 0, If[fy(A1) > 0, A1_h ≟ A1 + ((dx, dy) * vecmult / sqrt(2)), A1_h ≟ A1 + ((dx, (-dy)) * vecmult / sqrt(2))], If[fy(A1) > 0, A1_h ≟ A1 + (((-dx), dy) * vecmult / sqrt(2)), A1_h ≟ A1 + (((-dx), (-dy)) * vecmult / sqrt(2))]]
vector2correctangle: step ≥ 3 ∧ If[fx(A2) > 0, If[fy(A2) > 0, A2_h ≟ A2 + ((dx, dy) * vecmult / sqrt(2)), A2_h ≟ A2 + ((dx, (-dy)) * vecmult / sqrt(2))], If[fy(A2) > 0, A2_h ≟ A2 + (((-dx), dy) * vecmult / sqrt(2)), A2_h ≟ A2 + (((-dx), (-dy)) * vecmult / sqrt(2))]]
vector3correctangle: step ≥ 3 ∧ If[fx(A3) > 0, If[fy(A3) > 0, A3_h ≟ A3 + ((dx, dy) * vecmult / sqrt(2)), A3_h ≟ A3 + ((dx, (-dy)) * vecmult / sqrt(2))], If[fy(A3) > 0, A3_h ≟ A3 + (((-dx), dy) * vecmult / sqrt(2)), A3_h ≟ A3 + (((-dx), (-dy)) * vecmult / sqrt(2))]]
vector4correctangle: step ≥ 3 ∧ If[fourEs, If[fx(A4) > 0, If[fy(A4) > 0, A4_h ≟ A4 + ((dx, dy) * vecmult / sqrt(2)), A4_h ≟ A4 + ((dx, (-dy)) * vecmult / sqrt(2))], If[fy(A4) > 0, A4_h ≟ A4 + (((-dx), dy) * vecmult / sqrt(2)), A4_h ≟ A4 + (((-dx), (-dy)) * vecmult / sqrt(2))]], true]
A2indifferentregion: step ≥ 3 ∧ regionA2 ≠ regionA1
A3indifferentregion: step ≥ 3 ∧ regionA3 ≠ regionA1 ∧ regionA3 ≠ regionA2
A4indifferentregion: step ≥ 3 ∧ If[fourEs, regionA4 ≠ regionA1 ∧ regionA4 ≠ regionA2 ∧ regionA4 ≠ regionA3, true]
E1correct: step ≥ 2 ∧ (E1 ≟ E11real ∨ E1 ≟ E12real ∨ E1 ≟ E21real ∨ E1 ≟ E22real ∧ fourEs)
E2correct: step ≥ 2 ∧ (E2 ≟ E11real ∨ E2 ≟ E12real ∨ E2 ≟ E21real ∨ E2 ≟ E22real ∧ fourEs) ∧ E2 ≠ E1
E3correct: step ≥ 2 ∧ (E3 ≟ E11real ∨ E3 ≟ E12real ∨ E3 ≟ E21real ∨ E3 ≟ E22real ∧ fourEs) ∧ E3 ≠ E1 ∧ E3 ≠ E2
E4correct: step ≥ 2 ∧ If[fourEs, (E4 ≟ E11real ∨ E4 ≟ E12real ∨ E4 ≟ E21real ∨ E4 ≟ E22real) ∧ E4 ≠ E1 ∧ E4 ≠ E2 ∧ E4 ≠ E3, true]
nEscorrect: step ≥ 2 ∧ (fourEs ∧ n_e ≟ 4 ∨ (¬fourEs) ∧ n_e ≟ 3)
vector1YN2correctangle: step ≥ 4 ∧ (fx(P1onYN2) > 0 ∧ P1onYN2_h ≟ P1onYN2 + ((dx * vecmult), 0) ∨ fx(P1onYN2) < 0 ∧ P1onYN2_h ≟ P1onYN2 + (((-dx) * vecmult), 0))
vector1YN1correctangle: step ≥ 4 ∧ (fx(P1onYN1) > 0 ∧ P1onYN1_h ≟ P1onYN1 + ((dx * vecmult), 0) ∨ fx(P1onYN1) < 0 ∧ P1onYN1_h ≟ P1onYN1 + (((-dx) * vecmult), 0))
vector1XN2correctangle: step ≥ 4 ∧ (fy(P1onXN2) > 0 ∧ P1onXN2_h ≟ P1onXN2 + (0, (dy * vecmult)) ∨ fy(P1onXN2) < 0 ∧ P1onXN2_h ≟ P1onXN2 + (0, ((-dy) * vecmult)))
vector1XN1correctangle: step ≥ 4 ∧ (fy(P1onXN1) > 0 ∧ P1onXN1_h ≟ P1onXN1 + (0, (dy * vecmult)) ∨ fy(P1onXN1) < 0 ∧ P1onXN1_h ≟ P1onXN1 + (0, ((-dy) * vecmult)))
correcttrajectoryend: step ≥ 5 ∧ IndexOf[Xn, stableEs] > 0
classifyEquilibria: true
E1type = 1
E1stable = true
E2stable = false
E3stable = true
E4stable = true
E2type = 5
E3type = 2
E4type = 1
E1labelb = If(E1type ≟ 1, "SN", If[E1type ≟ 2, "SS", If[E1type ≟ 3, "C", If[E1type ≟ 4, "US", If[E1type ≟ 5, "UN", "SD"]]]])
E2labelb = If(E2type ≟ 1, "SN", If[E2type ≟ 2, "SS", If[E2type ≟ 3, "C", If[E2type ≟ 4, "US", If[E2type ≟ 5, "UN", "SD"]]]])
E3labelb = If(E3type ≟ 1, "SN", If[E3type ≟ 2, "SS", If[E3type ≟ 3, "C", If[E3type ≟ 4, "US", If[E3type ≟ 5, "UN", "SD"]]]])
E4labelb = If(E4type ≟ 1, "SN", If[E4type ≟ 2, "SS", If[E4type ≟ 3, "C", If[E4type ≟ 4, "US", If[E4type ≟ 5, "UN", "SD"]]]])
E1label: "" + E1 + ""
E2label: E2 + ""
E3label: E3 + ""
E4label: E4 + ""
Es = First({E1, E2, E3, E4}, If[step ≥ 2, n_e, 0])
E11ind = IndexOf(E11real, Es)
E12ind = IndexOf(E12real, Es)
E22ind = IndexOf(E22real, Es)
E21ind = IndexOf(E21real, Es)
Estables = First({E1stable, E2stable, E3stable, E4stable}, If[step ≥ 2, n_e, 0])
Etypes = First({E1type, E2type, E3type, E4type}, If[step ≥ 2, n_e, 0])
E11typecorrect: Element[Etypes, E11ind] ≟ 5
E21typecorrect: Element[Etypes, E21ind] ≟ If[IndexOf[E21real, stableEs] > 0, 1, 0]
E12typecorrect: Element[Etypes, E12ind] ≟ If[IndexOf[E12real, stableEs] > 0, 1, 0]
E22typecorrect: Element[Etypes, E22ind] ≟ If[IndexOf[E22real, stableEs] > 0, 1, 0]
showSaddleVectors = false
E22stabledir: (100, 200)
E22unstabledir: (-200, 100)
dxy = Max(dx, dy)
E22stable1: E22real + ((E22stabledir / Length[E22stabledir] * dxy) * vecmult)
E22stable2: E22real - ((E22stabledir / Length[E22stabledir] * dxy) * vecmult)
E22unstable1: E22real + ((E22unstabledir / Length[E22unstabledir] * dxy) * vecmult)
E22unstable2: E22real - ((E22unstabledir / Length[E22unstabledir] * dxy) * vecmult)
E22circle = Circle(E22real, (dxy * vecmult))
Q1_sub = Point(E22circle)
Q2_sub = Point(E22circle)
Qtol: (dxy * vecmult / 3)
Q1 = DynamicCoordinates(Q1_sub, If[Distance[Q1_sub, E22stable1] < Qtol, x(E22stable1), If[Distance[Q1_sub, E22stable2] < Qtol, x(E22stable2), If[Distance[Q1_sub, E22unstable1] < Qtol, x(E22unstable1), If[Distance[Q1_sub, E22unstable2] < Qtol, x(E22unstable2), x(Q1_sub)]]]], If[Distance[Q1_sub, E22stable1] < Qtol, y(E22stable1), If[Distance[Q1_sub, E22stable2] < Qtol, y(E22stable2), If[Distance[Q1_sub, E22unstable1] < Qtol, y(E22unstable1), If[Distance[Q1_sub, E22unstable2] < Qtol, y(E22unstable2), y(Q1_sub)]]]])
stablevec1 = Vector(Q1, E22real)
stablevec2 = Vector((2 * E22real) - Q1, E22real)
Q2 = DynamicCoordinates(Q2_sub, If[Distance[Q2_sub, E22stable1] < Qtol, x(E22stable1), If[Distance[Q2_sub, E22stable2] < Qtol, x(E22stable2), If[Distance[Q2_sub, E22unstable1] < Qtol, x(E22unstable1), If[Distance[Q2_sub, E22unstable2] < Qtol, x(E22unstable2), x(Q2_sub)]]]], If[Distance[Q2_sub, E22stable1] < Qtol, y(E22stable1), If[Distance[Q2_sub, E22stable2] < Qtol, y(E22stable2), If[Distance[Q2_sub, E22unstable1] < Qtol, y(E22unstable1), If[Distance[Q2_sub, E22unstable2] < Qtol, y(E22unstable2), y(Q2_sub)]]]])
unstablevec1 = Vector(E22real, Q2)
unstablevec2 = Vector(E22real, (2 * E22real) - Q2)
Q2labela: (Q2 - E22real) / Length[Q2 - E22real] + ""
showSaddleVectorsActual: showSaddleVectors ∧ E22typecorrect ∧ classifyEquilibria ∧ c > 1
E22stablefound: showSaddleVectorsActual ∧ (Q1 ≟ E22stable1 ∨ Q1 ≟ E22stable2)
E22unstablefound: showSaddleVectorsActual ∧ (Q2 ≟ E22unstable1 ∨ Q2 ≟ E22unstable2)
Q1labela: (Q1 - E22real) / Length[Q1 - E22real] + ""
Q1label = Text(Q1labela, Q1 + ((2 * x(Q1 - E22real)), (0.6 * y(Q1 - E22real))) - ((x(Corner[Q1labela, 2]) - x(Corner[Q1labela, 1])) / 2, (y(Corner[Q1labela, 3]) - y(Corner[Q1labela, 1])) / 4))
Q2label = Text(Q2labela, Q2 + ((2 * x(Q2 - E22real)), (0.6 * y(Q2 - E22real))) - ((x(Corner[Q2labela, 2]) - x(Corner[Q2labela, 1])) / 2, (y(Corner[Q2labela, 3]) - y(Corner[Q2labela, 1])) / 4))