m=%v

m=%v

t0 = 0
ymin = -5.873307286404545
ymax = 17.563311668501104
yscale: ymax - ymin
y0 = 5
Y0_sub = (-0.13816568047337408, 0.15567802445886444)
threshold = 0.03
xmax = 3.9121301775147863
xmin = -1.6488165680473368
xscale: xmax - xmin
Y0 = DynamicCoordinates(Y0_sub, If[x(Y0_sub) > xmax, xmax, If[x(Y0_sub)  <  xmin, xmin, If[abs(x(Y0_sub) - t0)  <  (threshold * xscale), t0, x(Y0_sub)]]], If[y(Y0_sub) > ymax, ymax, If[y(Y0_sub)  <  ymin, ymin, If[abs(y(Y0_sub) - y0)  <  (threshold * yscale), y0, y(Y0_sub)]]])
f(t) = 1 - t^(2)
gsub = Integral(f)
step = 1 (slider from 1 to 5, step 1)
T1_sub = (1.6023668639053221, 4.910934044294793)
scaleratio: yscale / xscale
fY0: f(x(Y0))
fY0scale: fY0 / scaleratio
xT1ClosePt = If(fY0 ≟ 0, x(T1_sub), ((y(T1_sub) - y(Y0)) / scaleratio + (fY0scale * x(Y0)) + x(T1_sub) / fY0scale) / (fY0scale + 1 / fY0scale))
T1ClosePt: (xT1ClosePt, y(Y0) + (fY0 * (xT1ClosePt - x(Y0))))
T1Correct: (step ≥ 2) ∧ ((x(T1_sub) - xT1ClosePt)^(2) / xscale^(2) + (y(T1_sub) - y(T1ClosePt))^(2) / yscale^(2)  <  threshold^(2))
dt = 2
T1 = DynamicCoordinates(T1_sub, If[T1Correct, If[xT1ClosePt > xmax, xmax, If[xT1ClosePt  <  xmin, xmin, xT1ClosePt]], If[x(T1_sub) > xmax, xmax, If[x(T1_sub)  <  xmin, xmin, x(T1_sub)]]], If[T1Correct, If[y(T1ClosePt) > ymax, ymax, If[y(T1ClosePt)  <  ymin, ymin, y(T1ClosePt)]], If[y(T1_sub) > ymax, ymax, If[y(T1_sub)  <  ymin, ymin, y(T1_sub)]]])
tangent1 = Line(Y0, T1)
LL = Corner(1)
UR = Corner(3)
mT1 = Slope(tangent1)
Y1_sub = (0.660946745562128, 4.316527041815302)
xY1ClosePt = If(mT1 ≟ 0, x(Y1_sub), ((y(Y1_sub) - y(Y0)) / scaleratio + (mT1 / scaleratio * x(Y0)) + (x(Y1_sub) * scaleratio / mT1)) / (mT1 / scaleratio + scaleratio / mT1))
Y1ClosePt: (xY1ClosePt, y(Y0) + (mT1 * (xY1ClosePt - x(Y0))))
Y1Target: (x(Y0) + dt, y(Y0) + (mT1 * dt))
Y1Correct: (step ≥ 3) ∧ ((x(Y1ClosePt) - x(Y1Target))^(2) / xscale^(2) + (y(Y1ClosePt) - y(Y1Target))^(2) / yscale^(2)  <  threshold^(2))
Y1 = DynamicCoordinates(Y1_sub, If[xY1ClosePt > xmax, xmax, If[xY1ClosePt  <  xmin, xmin, If[Y1Correct, x(Y1Target), xY1ClosePt]]], If[y(Y1ClosePt) > ymax, ymax, If[y(Y1ClosePt)  <  ymin, ymin, If[Y1Correct, y(Y1Target), y(Y1ClosePt)]]])
Y0Shadow: Y0
Y1Shadow: Y1
fY1: f(x(Y1))
fY1scale: fY1 / scaleratio
T2_sub = (-0.0724852071005931, 7.458392626349755)
xT2ClosePt = If(fY1 ≟ 0, x(T2_sub), ((y(T2_sub) - y(Y1)) / scaleratio + (fY1scale * x(Y1)) + x(T2_sub) / fY1scale) / (fY1scale + 1 / fY1scale))
T2ClosePt: (xT2ClosePt, y(Y1) + (fY1 * (xT2ClosePt - x(Y1))))
T2Correct: (step ≥ 4) ∧ ((x(T2_sub) - xT2ClosePt)^(2) / xscale^(2) + (y(T2_sub) - y(T2ClosePt))^(2) / yscale^(2)  <  threshold^(2))
T2 = DynamicCoordinates(T2_sub, If[T2Correct, If[xT2ClosePt > xmax, xmax, If[xT2ClosePt  <  xmin, xmin, xT2ClosePt]], If[x(T2_sub) > xmax, xmax, If[x(T2_sub)  <  xmin, xmin, x(T2_sub)]]], If[T2Correct, If[y(T2ClosePt) > ymax, ymax, If[y(T2ClosePt)  <  ymin, ymin, y(T2ClosePt)]], If[y(T2_sub) > ymax, ymax, If[y(T2_sub)  <  ymin, ymin, y(T2_sub)]]])
tangent2 = Line(Y1, T2)
mT2 = Slope(tangent2)
Y2_sub = (2.948816568047332, 3.2126283229248185)
xY2ClosePt = If(mT2 ≟ 0, x(Y2_sub), ((y(Y2_sub) - y(Y1)) / scaleratio + (mT2 / scaleratio * x(Y1)) + (x(Y2_sub) * scaleratio / mT2)) / (mT2 / scaleratio + scaleratio / mT2))
Y2ClosePt: (xY2ClosePt, y(Y1) + (mT2 * (xY2ClosePt - x(Y1))))
Y2Target: (x(Y1) + dt, y(Y1) + (mT2 * dt))
Y2Correct: (step ≥ 5) ∧ ((x(Y2ClosePt) - x(Y2Target))^(2) / xscale^(2) + (y(Y2ClosePt) - y(Y2Target))^(2) / yscale^(2)  <  threshold^(2))
Y2 = DynamicCoordinates(Y2_sub, If[xY2ClosePt > xmax, xmax, If[xY2ClosePt  <  xmin, xmin, If[Y2Correct, x(Y2Target), xY2ClosePt]]], If[y(Y2ClosePt) > ymax, ymax, If[y(Y2ClosePt)  <  ymin, ymin, If[Y2Correct, y(Y2Target), y(Y2ClosePt)]]])
Y0Correct: Y0 ≟ (t0, y0)
exact = true
tangent1exact: y = y(Y0) + (f(x(Y0)) * (x - x(Y0)))
g(t) = gsub(t) - gsub(x(Y0)) + y(Y0)
tangent2exact: y = g(x(Y1)) + (f(x(Y1)) * (x - x(Y1)))
a = Segment(Y0, Y1)
b = Segment(Y1, Y2)
c: x = x(Y1)