Length of the Path on a Rectangular Grid
Loading the math board and drawing, please wait…
This GeoGebra example dynamically demonstrates the calculation of the total length of a randomly generated path on a rectangular grid. The core mathematical concepts include coordinate representation on a grid, piecewise summation of segment lengths, random experiments, and comparison of rational and irrational lengths. The construction uses commands such as Sequence to generate random points, Insert, Join, and Polygon to build the path, and Sum to accumulate segment lengths. Key objects include width, length, list0, and points A1 through A25, with the final length displayed via texte1. This resource is suitable for middle school, high school, or introductory college mathematics, helping students understand path length computation, stochastic simulation, and the integration of geometry and algebra. It also serves as an extension for exploring the Pythagorean theorem in grid contexts.
GeoGebra Commands & Parameters
Sequence(1, i, 1, length + (a * 0)) → list0Insert(0, A1, Random[1, Length[A1] + 1]) → A2Insert(0, A2, Random[1, Length[A2 + 1]]) → A3Insert(0, A3, Random[1, Length[A3 + 1]]) → A4Insert(0, A4, Random[1, Length[A4 + 1]]) → A5Insert(0, A5, Random[1, Length[A5 + 1]]) → A6Insert(0, A6, Random[1, Length[A6 + 1]]) → A7Insert(0, A7, Random[1, Length[A7 + 1]]) → A8Insert(0, A8, Random[1, Length[A8 + 1]]) → A9Insert(0, A9, Random[1, Length[A9 + 1]]) → A10Insert(0, A10, Random[1, Length[A10 + 1]]) → A11Insert(0, A11, Random[1, Length[A11 + 1]]) → A12Insert(0, A12, Random[1, Length[A12 + 1]]) → A13Insert(0, A13, Random[1, Length[A13 + 1]]) → A14Insert(0, A14, Random[1, Length[A14 + 1]]) → A15Insert(0, A15, Random[1, Length[A15 + 1]]) → A16Insert(0, A16, Random[1, Length[A16 + 1]]) → A17Insert(0, A17, Random[1, Length[A17 + 1]]) → A18Insert(0, A18, Random[1, Length[A18 + 1]]) → A19Insert(0, A19, Random[1, Length[A19 + 1]]) → A20Insert(0, A20, Random[1, Length[A20 + 1]]) → A21Insert(0, A21, Random[1, Length[A21 + 1]]) → A22Insert(0, A22, Random[1, Length[A22 + 1]]) → A23Insert(0, A23, Random[1, Length[A23 + 1]]) → A24Insert(0, A24, Random[1, Length[A24 + 1]]) → A25Element(L_1, width + 1) → list1Sequence(Sum[Take[list1, 1, i]], i, 1, length + width) → list2Sequence((0, 0) + (Element[list2, i] * (1, 0)) + ((i - Element[list2, i]) * (0, 1)), i, 1, length + width) → list3Join({{(0, 0)}, list3}) → list4Sequence(Vector[Element[list4, i], Element[list4, i + 1]], i, 1, length + width) → list5Sequence(Segment[(i, 0), (i, width)], i, 0, length) → list6Sequence(Segment[(0, i), (length, i)], i, 0, width) → list7Polygon(C, B, D, A) → poly1, c, b_1, d, a_1Sequence(Segment[Element[list4, i], Element[list4, i + 1]], i, 1, length + width) → liste1Sum(liste1) → eSequence(If[y(Element[list4, i]) ≟ y(Element[list4, i + 1]), Segment[Element[list4, i], Element[list4, i + 1]], 0], i, 1, Length[list4]) → l2RemoveUndefined(l2) → l1Sequence(Midpoint[Element[l1, i]], i, 1, Length[l1]) → l3Sequence((x(Element[l3, i]), 0), i, 1, Length[l3]) → l3bSequence(Vector[Element[l3, i], Element[l3b, i]], i, 1, Length[l3]) → l4Sequence(Translate[Element[l1, i], Vector[(g / 10 * Element[l4, i])]], i, 1, Length[l1]) → l1bSequence(If[x(Element[list4, i]) ≟ x(Element[list4, i + 1]), Segment[Element[list4, i], Element[list4, i + 1]], 0], i, 1, Length[list4]) → verti1RemoveUndefined(verti1) → verSequence(Midpoint[Element[ver, i]], i, 1, Length[ver]) → milverSequence((length, y(Element[milver, i])), i, 1, Length[l3]) → verbSequence(Vector[Element[milver, i], Element[verb, i]], i, 1, Length[l3]) → l5Sequence(Translate[Element[ver, i], Vector[(g / 10 * Element[l5, i])]], i, 1, Length[ver]) → l6