Ver recta y = x

Ver recta y = r x + 1

n = 1 (slider from 1 to 30, step 1)
paso: n - 1
r = 0.5 (slider from 0.01 to 0.99, step 0.01)
lista1 = Sequence(r^(k), k, 0, 31)
lista2 = Sequence((Sum[lista1, k], Sum[lista1, k]), k, 1, 31)
lista2' = Insert((0, 0), lista2, 1)
lim: 1 / (1 - r)
f(x) = x
g(x) = (r * x) + 1
S = Intersect(f, g, (2, 2))
lista3 = Sequence((Sum[lista1, k], (r * Sum[lista1, k]) + 1), k, 1, 31)
verf = false
verg = false
lista3' = Insert((0, 1), lista3, 1)
B = Element(lista3', paso + 1)
texto4 = FractionText(lim)
A = Element(lista2', paso + 1)
lista4 = Sequence(Segment[Element[lista2', k], Element[lista3', k]], k, 1, 30)
lista5 = Sequence(Segment[Element[lista3', k], Element[lista2', k + 1]], k, 1, 30)
s = Segment(A, B)
a = Segment((0, 0), S)
b = Segment((0, 1), S)
texto5: "B=" + (LaTeX[B]) + ""
texto6: "A=" + (LaTeX[A]) + ""
texto1_1: "S=\left( \frac{1}{1-r}, \frac{1}{1-r}   \right)=\left(" + (LaTeX[texto4]) + ", " + (LaTeX[texto4]) + "   \right)"
texto3: "a_{" + (LaTeX[n]) + "}=r^{" + (LaTeX[paso]) + "}=" + (LaTeX[r^(paso)]) + ""
texto2: "a_{" + (LaTeX[n]) + "}"