Chaos in the Zoo

Chaos in the Zoo
Loading the math board and drawing, please wait…
2023-03-14 18:44
This example demonstrates how to construct and simulate random movements and distributions of animals in a zoo, creating a chaotic phenomenon using GeoGebra. The core math concepts involved include probability and statistics. Construction highlights - based on the 'Construction Summary' below, the following GeoGebra commands/objects are used: Join, Sequence, If, Remove, Textfield, Max, Polygon, Shuffle, Element, Append, Translate, IndexOf, Sum, Point, OrthogonalLine, Midpoint; Objects: PosCorrectIndex5, PosCorrectIndex4, PosCorrectIndex3, PosCorrectIndex2, PosCorrectIndex1, listPosCorrectText, questionCount, A4GeringstenHäufigsten, LPD5, A5WenigerMehr, LPD4, AAufgabenText, LPD3, A5Vielfaches, LPD2, LPD1, IndexA12, IndexList, Index, StartA, StartListe, ZwischenFolge, ElefantenA2, RowEis, AAufgaben, IndexA11, A3AufgabenText, Dropdown4, A3Aufgaben, correct04, A4Aufgabe3, A4RightSide, sol4, b, a, aInput, InputBox1, IndexA1TrueFalse, erlaubteZeichen, inputCorrect01. Intended for: This example is suitable for students in grades 5-6 to learn and practice basic concepts of probability and statistics, such as the calculation of absolute frequencies.

GeoGebra Commands & Parameters

  1. Join({{"$\textsf{\vphantom{Äg}Wähle aus!}$"}, Sequence[(("$\textsf{\vphantom{Äg}" * A4GeringstenHäufigsten(i)) * ".}$"), i, 1, CountIf[x ≠ "", A4GeringstenHäufigsten]]}) → LPD5
  2. Join({{"$\textsf{\vphantom{Äg}Wähle aus!}$"}, Sequence[(("$\textsf{\vphantom{Äg}" * A5WenigerMehr(i)) * "}$"), i, 1, CountIf[x ≠ "", A5WenigerMehr]]}) → LPD4
  3. Join({{"$\textsf{\vphantom{Äg}Wähle aus!}$"}, Sequence[(("$\textsf{\vphantom{Äg}" * AAufgabenText(i)) * "}$"), i, 1, CountIf[x ≠ "", AAufgabenText]]}) → LPD3
  4. Join({{"$\textsf{\vphantom{Äg}Wähle aus!}$"}, Sequence[(("$\textsf{\vphantom{Äg}" * A5Vielfaches(i)) * "}$"), i, 1, CountIf[x ≠ "", A5Vielfaches]]}) → LPD2
  5. Join({{"$\textsf{\vphantom{Äg}Wähle aus!}$"}, Sequence[(("$\textsf{\vphantom{Äg}" * AAufgabenText(i)) * "}$"), i, 1, CountIf[x ≠ "", AAufgabenText]]}) → LPD1
  6. Sequence(Random[5, 7], i, 1, 100) → IndexA12, {5, 5, 6, 6, 5, 5, 6, 6, 5, 6, 6, 5, 5, 5, 5, 6, 5, 7, 7, 7, 7, 7, 6, 5, 6, 5, 7, 5, 7, 7, 6, 5, 6, 6, 6, 5, 7, 6, 6, 7, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 5, 5, 7, 5, 6, 5, 6, 6, 7, 6, 7, 7, 6, 6, 7, 7, 5, 5, 7, 7, 7, 7, 5, 5, 5, 6, 7, 5, 5, 6, 7, 6, 7, 5, 6, 6, 7, 7, 7, 7, 6, 5, 6, 5, 6, 6, 5, 7, 6, 5}
  7. Sequence(Random[1, 4], i, 1, 100) → IndexList, {1, 4, 2, 3, 2, 4, 1, 2, 2, 4, 4, 1, 2, 3, 4, 1, 1, 1, 4, 3, 3, 2, 3, 3, 2, 3, 2, 1, 1, 1, 2, 4, 1, 3, 3, 1, 1, 3, 4, 2, 2, 1, 2, 3, 1, 1, 4, 2, 4, 1, 2, 4, 2, 3, 3, 2, 4, 3, 2, 2, 2, 1, 4, 2, 2, 2, 4, 3, 4, 4, 2, 1, 1, 3, 1, 4, 3, 3, 3, 3, 2, 4, 3, 4, 4, 2, 4, 4, 3, 1, 2, 3, 3, 2, 1, 4, 3, 3, 1, 1}
  8. If(StartA, StartListe, Shuffle[Shuffle[Sequence[i, i, 8, 15]]]) → ZwischenFolge
  9. Remove(Sequence[If[Mod[ZwischenFolge(Index + 1 + i), 2] ≟ 0, ZwischenFolge(Index + 1 + i) / 2, 0], i, 0, 10], Sequence[0, i, 1, 10]) → ElefantenA2
  10. If(StartA, StartListe, Join[{{ElefantenA2(1)}, ZwischenFolge \ {ZwischenFolge(1)}}]) → RowEis
  11. Sequence(RowEis(i), i, 1, 7) → AAufgaben, {5, 13, 12, 3, 4, 15, 26}
  12. Sequence(Random[1, 4], i, 1, 100) → IndexA11, {2, 4, 4, 1, 2, 4, 4, 3, 2, 2, 1, 3, 1, 4, 2, 4, 3, 3, 1, 4, 3, 3, 4, 2, 3, 2, 1, 2, 4, 4, 3, 4, 1, 3, 2, 3, 4, 1, 4, 3, 3, 4, 2, 3, 3, 4, 1, 2, 3, 4, 3, 1, 3, 1, 3, 4, 3, 1, 1, 4, 1, 4, 3, 1, 1, 1, 1, 1, 3, 1, 2, 2, 2, 4, 2, 1, 1, 4, 4, 3, 3, 1, 1, 3, 4, 1, 3, 1, 2, 3, 3, 3, 1, 2, 2, 3, 4, 1, 1, 3}
  13. Remove(AAufgabenText, {AAufgabenText(IndexA11(questionCount)), AAufgabenText(IndexA12(questionCount))}) → A3AufgabenText
  14. Join({{"$\textsf{\vphantom{Äg}Wähle aus!}$"}, Sequence[(("$\textsf{\vphantom{Äg}" * A3AufgabenText(i)) * ".}$"), i, 1, CountIf[x ≠ "", A3AufgabenText]]}) → Dropdown4
  15. Remove(AAufgaben, {AAufgaben(IndexA11(questionCount)), AAufgaben(IndexA12(questionCount))}) → A3Aufgaben
  16. Textfield(aInput) → InputBox1
  17. Sequence(RandomElement[{true, true, false, false, false}], i, 1, 100) → IndexA1TrueFalse, {false, false, false, true, false, false, false, true, false, true, false, false, false, false, true, false, true, false, false, false, false, false, false, false, false, false, true, true, true, false, false, true, true, false, false, true, true, false, false, true, true, false, false, true, false, true, true, false, false, false, true, true, false, false, false, true, true, true, false, false, true, false, false, true, false, false, true, true, false, true, false, false, false, false, false, false, true, false, false, true, false, true, false, false, false, false, true, false, false, false, true, false, true, false, true, true, false, true, true, true}
  18. If(IndexA1TrueFalse(questionCount), AAufgaben(IndexA11(questionCount)) + AAufgaben(IndexA12(questionCount)), AAufgaben(IndexA11(questionCount))) → A1Angabe
  19. Textfield(bInput) → InputBox2
  20. Textfield(cInput) → InputBox3
  21. Join({{"$\textsf{\vphantom{Äg}Wähle aus!}$"}, Sequence[(("$\textsf{\vphantom{Äg}" * AAufgabenText(i)) * "}$"), i, 1, CountIf[x ≠ "", AAufgabenText]]}) → Dropdown2
  22. Join({{"$\textsf{\vphantom{Äg}Wähle aus!}$"}, Sequence[(("$\textsf{\vphantom{Äg}" * AAufgabenText(i)) * "}$"), i, 1, CountIf[x ≠ "", AAufgabenText]]}) → Dropdown5
  23. If(StartA, false, AAufgaben(IndexA11(questionCount)) > AAufgaben(IndexA12(questionCount))) → sol2
  24. Join({{"$\textsf{Wähle aus!}$"}, ListeEis}) → SelectIce
  25. Max(AAufgaben) → H1
  26. Max(Remove[AAufgaben, {H1}]) → H2
  27. Max(Remove[AAufgaben, {H1, H2}]) → H3
  28. Max(Remove[AAufgaben, {H1, H2, H3}]) → H4
  29. Max(Remove[AAufgaben, {H1, H2, H3, H4}]) → H5
  30. If(Index ≟ 1, H1, Index ≟ 2, H2, Index ≟ 3, H3, Index ≟ 4, H5) → Sol1
  31. If(a, FBPos1, FBPos2) → PtopLeftCornerFeedback
  32. Polygon(PtopLeftCornerFeedback, PtopRightCornerFeedback, PbottomRightCornerFeedback, PbottomLeftCornerFeedback) → Feedback5, ptopleftcornerfeedback, ptoprightcornerfeedback, pbottomrightcornerfeedback, pbottomleftcornerfeedback
  33. Shuffle(Sequence[Random[0, 10], i, 1, 100]) → randomNosForX, {7, 9, 1, 1, 8, 10, 3, 4, 3, 3, 2, 10, 7, 5, 5, 2, 2, 4, 1, 8, 7, 2, 3, 0, 9, 8, 10, 6, 8, 2, 10, 8, 5, 5, 10, 5, 1, 0, 3, 5, 5, 6, 1, 1, 4, 6, 9, 2, 9, 10, 4, 7, 10, 3, 5, 0, 5, 2, 6, 4, 7, 7, 2, 7, 4, 2, 8, 5, 5, 10, 1, 2, 10, 9, 9, 5, 2, 6, 8, 8, 9, 7, 10, 6, 9, 10, 9, 5, 4, 0, 3, 2, 3, 1, 6, 10, 2, 9, 4, 9}
  34. Element(randomNosForX, Mod[questionCount, 100] + 1) → numX
  35. Shuffle(Sequence[Random[0, 10], i, 1, 100]) → randomNosForY, {7, 8, 4, 10, 1, 7, 7, 4, 1, 1, 1, 3, 6, 10, 7, 3, 9, 6, 4, 4, 8, 4, 7, 9, 4, 6, 5, 0, 6, 7, 3, 6, 2, 9, 9, 10, 9, 5, 7, 10, 7, 3, 9, 9, 0, 4, 2, 1, 1, 10, 6, 5, 1, 3, 10, 6, 8, 0, 8, 5, 3, 10, 1, 9, 3, 1, 4, 6, 0, 10, 6, 0, 0, 10, 8, 1, 2, 9, 7, 1, 7, 5, 10, 3, 5, 6, 2, 8, 9, 0, 4, 5, 6, 8, 6, 6, 0, 1, 5, 9}
  36. Element(randomNosForY, Mod[questionCount, 100] + 1) → numY
  37. Append(true, Sequence[If[randomNosForX(i) ≟ randomNosForX(i - 1), false, true], i, 2, 100]) → stayX
  38. Append(true, Sequence[If[randomNosForY(i) ≟ randomNosForY(i - 1), false, true], i, 2, 100]) → stayY
  39. Remove(Sequence[If[stayX(i), randomNosForX(i), 0], i, 1, 100], Sequence[0, i, 1, 100]) → randomNosForXwithoutRepeat
  40. Element(randomNosForXwithoutRepeat, Mod[questionCount, Length[randomNosForXwithoutRepeat]] + 1) → numXwithoutRepeat
  41. Sequence(Random[30, 45], i, 1, 30) → l1, {42, 42, 37, 42, 36, 34, 37, 34, 41, 30, 37, 35, 30, 31, 42, 37, 44, 35, 36, 39, 35, 43, 39, 42, 35, 35, 43, 31, 41, 31}
  42. Polygon(A, B, C, D) → v1, a_{1}, b_{1}, c, d
  43. Textfield(dInput) → InputBox4
  44. Textfield(eInput) → InputBox5
  45. Sequence(Pos1 + (i * (dx, 0)), i, 0, 3) → InputPos
  46. Polygon(CornerFeedback, CornerFeedback + (length, 0), CornerFeedback + (length, height), CornerFeedback + (0, height)) → Feedback1, cornerfeedback, g, h, i
  47. Translate(Feedback1, (dx, 0)) → Feedback2
  48. Translate(Feedback2, (dx, 0)) → Feedback3
  49. Translate(Feedback3, (dx, 0)) → Feedback4
  50. Max(Remove[AAufgaben, {H1, H2, H3, H4, H5}]) → H6
  51. Max(Remove[AAufgaben, {H1, H2, H3, H4, H5, H6}]) → H7
  52. IndexOf(A5Aufgabe(1), AAufgaben) → Index5
  53. If(AAufgaben(IndexA11(questionCount)) < AAufgaben(IndexA12(questionCount)), 1, false) → ZZZ
  54. Polygon(Corner[InputBox1, 1] - (dx00, dy00), (x(Corner[InputBox1, 3] + (dx00, dy00 + dy01)), y(Corner[InputBox1, 1] - (dx00, dy00))), Corner[InputBox1, 3] + (dx00, dy00 + dy01), (x(Corner[InputBox1, 1] - (dx00, dy00)), y(Corner[InputBox1, 3] + (dx00, dy00 + dy01)))) → v2, f, j, k, l
  55. Polygon(Corner[InputBox2, 1] - (dx00, dy00), (x(Corner[InputBox2, 3] + (dx00, dy00 + dy01)), y(Corner[InputBox2, 1] - (dx00, dy00))), Corner[InputBox2, 3] + (dx00, dy00 + dy01), (x(Corner[InputBox2, 1] - (dx00, dy00)), y(Corner[InputBox2, 3] + (dx00, dy00 + dy01)))) → v3, m, n, p, q
  56. Polygon(Corner[InputBox3, 1] - (dx00, dy00), (x(Corner[InputBox3, 3] + (dx00, dy00 + dy01)), y(Corner[InputBox3, 1] - (dx00, dy00))), Corner[InputBox3, 3] + (dx00, dy00 + dy01), (x(Corner[InputBox3, 1] - (dx00, dy00)), y(Corner[InputBox3, 3] + (dx00, dy00 + dy01)))) → v4, r, s, t, e
  57. Sum(AAufgaben) → SummeTiere
  58. If(questionCount ∈ {1, 2, 4, 5} ∧ b, CPos2, questionCount ≟ 3, CPos3, CPos1) → CPos
  59. Point(xAxis) → H
  60. OrthogonalLine(H, xAxis) → f_1
  61. Point(yAxis) → I
  62. OrthogonalLine(I, yAxis) → g_1
  63. Midpoint(J, K) → L
  64. OrthogonalLine(L, g_1) → h_1
  65. Midpoint(M, K) → N
  66. OrthogonalLine(N, f_1) → i_1

AI Drawing Prompt Reference

Create a “chaotic motion in a zoo” probability exercise layout. Include a rectangular feedback panel built from a polygon, with the four corners defined by points so that one corner is visually determined by selecting among five candidate maximum values and then choosing the final corner by an index rule. Place accompanying interface elements: several short text areas, two dropdown choice areas labeled generically as options, three input text fields for user answers, and a dedicated answer/feedback area. Add small geometric markers that represent positions chosen from a randomized sequence with a no-immediate-repeat adjustment, showing how the chosen positions drive the feedback-panel corner highlight in a coherent construction order.
The prompt above was compiled from the original drawing commands and is for reference only.