Zahldarstellung

Textdarstellung

n = 10 (slider from 0 to 10, step 1)
Knoten = Sequence(Sequence[((-j) | (-j)) + (i * (2 | 0)), i, 0, j], j, 0, n)
P = Point(Knoten)
n0: (-y(P))
k0: (x(P) - y(P)) / 2
KantenL = Sequence(Sequence[Segment[Knoten(j, i), Knoten(j, i) + (-1 | -1)], i, 1, j], j, 1, n)
KantenR = Sequence(Sequence[Segment[Knoten(j, i), Knoten(j, i) + (1 | -1)], i, 1, j], j, 1, n)
Felder = Sequence(true, i, 1, 8)
Bewegungen: {1, 0, 0, 0, 1, 0, 1, 0, 0, 1}
PWeg = Append((0 | 0), Sequence[((-i) | (-i)) + ((2 * Sum[Take[Bewegungen, 1, i]]) | 0), i, 1, n0])
Weg = PolyLine(PWeg)
L1: (0 | 1) + (n0 * (-0.5 | 0))
L = Sequence(L1 + ((i - 1) * (1 | 0)), i, 1, n)
Q1 = Polygon({L(1), L(1) + (1 | 0), L(1) + (1 | 1), L(1) + (0 | 1)})
Q2 = Polygon({L(2), L(2) + (1 | 0), L(2) + (1 | 1), L(2) + (0 | 1)})
Q3 = Polygon({L(3), L(3) + (1 | 0), L(3) + (1 | 1), L(3) + (0 | 1)})
Q4 = Polygon({L(4), L(4) + (1 | 0), L(4) + (1 | 1), L(4) + (0 | 1)})
Q5 = Polygon({L(5), L(5) + (1 | 0), L(5) + (1 | 1), L(5) + (0 | 1)})
Q6 = Polygon({L(6), L(6) + (1 | 0), L(6) + (1 | 1), L(6) + (0 | 1)})
Q7 = Polygon({L(7), L(7) + (1 | 0), L(7) + (1 | 1), L(7) + (0 | 1)})
Q8 = Polygon({L(8), L(8) + (1 | 0), L(8) + (1 | 1), L(8) + (0 | 1)})
Q9 = Polygon({L(9), L(9) + (1 | 0), L(9) + (1 | 1), L(9) + (0 | 1)})
Q10 = Polygon({L(10), L(10) + (1 | 0), L(10) + (1 | 1), L(10) + (0 | 1)})
k = Sum(Take[Bewegungen, 1, n0])
PosBin: P + (-0.6 | -0.5)
bin = nCr(n0, k0)
a = false
Text1: "k = " + k + ""
LStrecken = Sequence(If[x(PWeg(i + 1)) < x(PWeg(i)), Segment[PWeg(i), PWeg(i + 1)], Segment[PWeg(i), PWeg(i)]], i, 1, Length[PWeg] - 1)
RStrecken = Sequence(If[x(PWeg(i + 1)) > x(PWeg(i)), Segment[PWeg(i), PWeg(i + 1)], Segment[PWeg(i), PWeg(i)]], i, 1, Length[PWeg] - 1)
Text2: "n = " + n0 + ""
Text3: "Auswahl " + k + " aus " + n0 + ""
b = true
TextBinWert = Text(bin, PosBin + (0.2 | -0.2), true, true)
TextBin: "\binom{" + (LaTeX[n0]) + "}{" + (LaTeX[k0]) + "}"