Pascal's Triangle Hockey Stick Pattern Demo

Pascal's Triangle Hockey Stick Pattern Demo
Loading the math board and drawing, please wait…
2019-02-12 01:25
This example demonstrates the Hockey Stick Pattern in Pascal's Triangle, involving sequences, combinatorics, vectors, and geometric constructions. It uses GeoGebra commands like UnicodeToLetter, Polygon, Vector, nCr, Midpoint, Text, Sequence, Random, Join, RemoveUndefined, and If. Ideal for high school mathematics education to understand combinatorial mathematics and geometric patterns.

GeoGebra Commands & Parameters

  1. UnicodeToLetter(10007) → xmark
  2. UnicodeToLetter(10003) → cmark
  3. Polygon(BLviewbox, (x(BLviewbox), y(TRviewbox)), TRviewbox, (x(TRviewbox), y(BLviewbox))) → viewbox, vb1, vb4, vb2, vb3
  4. Polygon(A, B, 6) → hexagon1, Aside_2, F, Aside_1, Aside_3, Aside_4, Aside_5, Aside_6, C, D, E
  5. Vector(A, E) → v
  6. Vector(F, B) → u
  7. Polygon(A + (B2 * u) + (C2 * v), B + (B2 * u) + (C2 * v), 6) → A2
  8. Polygon(A + (B3 * u) + (C3 * v), B + (B3 * u) + (C3 * v), 6) → A3
  9. Polygon(A + (B4 * u) + (C4 * v), B + (B4 * u) + (C4 * v), 6) → A4
  10. Polygon(A + (B5 * u) + (C5 * v), B + (B5 * u) + (C5 * v), 6) → A5
  11. Polygon(A + (B6 * u) + (C6 * v), B + (B6 * u) + (C6 * v), 6) → A6
  12. Polygon(A + (B7 * u) + (C7 * v), B + (B7 * u) + (C7 * v), 6) → A7
  13. Polygon(A + (B8 * u) + (C8 * v), B + (B8 * u) + (C8 * v), 6) → A8
  14. Polygon(A + (B9 * u) + (C9 * v), B + (B9 * u) + (C9 * v), 6) → A9
  15. Polygon(A + (B10 * u) + (C10 * v), B + (B10 * u) + (C10 * v), 6) → A10
  16. Polygon(A + (B11 * u) + (C11 * v), B + (B11 * u) + (C11 * v), 6) → A11
  17. Polygon(A + (B12 * u) + (C12 * v), B + (B12 * u) + (C12 * v), 6) → A12
  18. Polygon(A + (B13 * u) + (C13 * v), B + (B13 * u) + (C13 * v), 6) → A13
  19. Polygon(A + (B14 * u) + (C14 * v), B + (B14 * u) + (C14 * v), 6) → A14
  20. Polygon(A + (B15 * u) + (C15 * v), B + (B15 * u) + (C15 * v), 6) → A15
  21. Polygon(A + (B16 * u) + (C16 * v), B + (B16 * u) + (C16 * v), 6) → A16
  22. Polygon(A + (B17 * u) + (C17 * v), B + (B17 * u) + (C17 * v), 6) → A17
  23. Polygon(A + (B18 * u) + (C18 * v), B + (B18 * u) + (C18 * v), 6) → A18
  24. Polygon(A + (B19 * u) + (C19 * v), B + (B19 * u) + (C19 * v), 6) → A19
  25. Polygon(A + (B20 * u) + (C20 * v), B + (B20 * u) + (C20 * v), 6) → A20
  26. Polygon(A + (B21 * u) + (C21 * v), B + (B21 * u) + (C21 * v), 6) → A21
  27. Polygon(A + (B22 * u) + (C22 * v), B + (B22 * u) + (C22 * v), 6) → A22
  28. Polygon(A + (B23 * u) + (C23 * v), B + (B23 * u) + (C23 * v), 6) → A23
  29. Polygon(A + (B24 * u) + (C24 * v), B + (B24 * u) + (C24 * v), 6) → A24
  30. Polygon(A + (B25 * u) + (C25 * v), B + (B25 * u) + (C25 * v), 6) → A25
  31. Polygon(A + (B26 * u) + (C26 * v), B + (B26 * u) + (C26 * v), 6) → A26
  32. Polygon(A + (B27 * u) + (C27 * v), B + (B27 * u) + (C27 * v), 6) → A27
  33. Polygon(A + (B28 * u) + (C28 * v), B + (B28 * u) + (C28 * v), 6) → A28
  34. Polygon(A + (B29 * u) + (C29 * v), B + (B29 * u) + (C29 * v), 6) → A29
  35. Polygon(A + (B30 * u) + (C30 * v), B + (B30 * u) + (C30 * v), 6) → A30
  36. Polygon(A + (B31 * u) + (C31 * v), B + (B31 * u) + (C31 * v), 6) → A31
  37. Polygon(A + (B32 * u) + (C32 * v), B + (B32 * u) + (C32 * v), 6) → A32
  38. Polygon(A + (B33 * u) + (C33 * v), B + (B33 * u) + (C33 * v), 6) → A33
  39. Polygon(A + (B34 * u) + (C34 * v), B + (B34 * u) + (C34 * v), 6) → A34
  40. Polygon(A + (B35 * u) + (C35 * v), B + (B35 * u) + (C35 * v), 6) → A35
  41. Polygon(A + (B36 * u) + (C36 * v), B + (B36 * u) + (C36 * v), 6) → A36
  42. nCr(B2 - 1, C2 - 1) → F2
  43. nCr(B3 - 1, C3 - 1) → F3
  44. nCr(B4 - 1, C4 - 1) → F4
  45. nCr(B5 - 1, C5 - 1) → F5
  46. nCr(B6 - 1, C6 - 1) → F6
  47. nCr(B7 - 1, C7 - 1) → F7
  48. nCr(B8 - 1, C8 - 1) → F8
  49. nCr(B9 - 1, C9 - 1) → F9
  50. nCr(B10 - 1, C10 - 1) → F10
  51. nCr(B11 - 1, C11 - 1) → F11
  52. nCr(B12 - 1, C12 - 1) → F12
  53. nCr(B13 - 1, C13 - 1) → F13
  54. nCr(B14 - 1, C14 - 1) → F14
  55. nCr(B15 - 1, C15 - 1) → F15
  56. nCr(B16 - 1, C16 - 1) → F16
  57. nCr(B17 - 1, C17 - 1) → F17
  58. nCr(B18 - 1, C18 - 1) → F18
  59. nCr(B19 - 1, C19 - 1) → F19
  60. nCr(B20 - 1, C20 - 1) → F20
  61. nCr(B21 - 1, C21 - 1) → F21
  62. nCr(B22 - 1, C22 - 1) → F22
  63. nCr(B23 - 1, C23 - 1) → F23
  64. nCr(B24 - 1, C24 - 1) → F24
  65. nCr(B25 - 1, C25 - 1) → F25
  66. nCr(B26 - 1, C26 - 1) → F26
  67. nCr(B27 - 1, C27 - 1) → F27
  68. nCr(B28 - 1, C28 - 1) → F28
  69. nCr(B29 - 1, C29 - 1) → F29
  70. nCr(B30 - 1, C30 - 1) → F30
  71. nCr(B31 - 1, C31 - 1) → F31
  72. nCr(B32 - 1, C32 - 1) → F32
  73. nCr(B33 - 1, C33 - 1) → F33
  74. nCr(B34 - 1, C34 - 1) → F34
  75. nCr(B35 - 1, C35 - 1) → F35
  76. nCr(B36 - 1, C36 - 1) → F36
  77. nCr(B37 - 1, C37 - 1) → F37
  78. Midpoint(F, C) → Center
  79. Text(F2, Center + (B2 * u) + (C2 * v) - (0.1 + (Length[Text[F2]] * 0.1), 0.2)) → H2
  80. Text(F3, Center + (B3 * u) + (C3 * v) - (0.1 + (Length[Text[F3]] * 0.1), 0.2)) → H3
  81. Text(F4, Center + (B4 * u) + (C4 * v) - (0.1 + (Length[Text[F4]] * 0.1), 0.2)) → H4
  82. Text(F5, Center + (B5 * u) + (C5 * v) - (0.1 + (Length[Text[F5]] * 0.1), 0.2)) → H5
  83. Text(F6, Center + (B6 * u) + (C6 * v) - (0.1 + (Length[Text[F6]] * 0.1), 0.2)) → H6
  84. Text(F7, Center + (B7 * u) + (C7 * v) - (0.1 + (Length[Text[F7]] * 0.1), 0.2)) → H7
  85. Text(F8, Center + (B8 * u) + (C8 * v) - (0.1 + (Length[Text[F8]] * 0.1), 0.2)) → H8
  86. Text(F9, Center + (B9 * u) + (C9 * v) - (0.1 + (Length[Text[F9]] * 0.1), 0.2)) → H9
  87. Text(F10, Center + (B10 * u) + (C10 * v) - (0.1 + (Length[Text[F10]] * 0.1), 0.2)) → H10
  88. Text(F11, Center + (B11 * u) + (C11 * v) - (0.1 + (Length[Text[F11]] * 0.1), 0.2)) → H11
  89. Text(F12, Center + (B12 * u) + (C12 * v) - (0.1 + (Length[Text[F12]] * 0.1), 0.2)) → H12
  90. Text(F13, Center + (B13 * u) + (C13 * v) - (0.1 + (Length[Text[F13]] * 0.1), 0.2)) → H13
  91. Text(F14, Center + (B14 * u) + (C14 * v) - (0.1 + (Length[Text[F14]] * 0.1), 0.2)) → H14
  92. Text(F15, Center + (B15 * u) + (C15 * v) - (0.1 + (Length[Text[F15]] * 0.1), 0.2)) → H15
  93. Text(F16, Center + (B16 * u) + (C16 * v) - (0.1 + (Length[Text[F16]] * 0.1), 0.2)) → H16
  94. Text(F18, Center + (B18 * u) + (C18 * v) - (0.1 + (Length[Text[F18]] * 0.1), 0.2)) → H18
  95. Text(F19, Center + (B19 * u) + (C19 * v) - (0.1 + (Length[Text[F19]] * 0.1), 0.2)) → H19
  96. Text(F20, Center + (B20 * u) + (C20 * v) - (0.1 + (Length[Text[F20]] * 0.1), 0.2)) → H20
  97. Text(F21, Center + (B21 * u) + (C21 * v) - (0.1 + (Length[Text[F21]] * 0.1), 0.2)) → H21
  98. Text(F22, Center + (B22 * u) + (C22 * v) - (0.1 + (Length[Text[F22]] * 0.1), 0.2)) → H22
  99. Text(F23, Center + (B23 * u) + (C23 * v) - (0.1 + (Length[Text[F23]] * 0.1), 0.2)) → H23
  100. Text(F24, Center + (B24 * u) + (C24 * v) - (0.1 + (Length[Text[F24]] * 0.1), 0.2)) → H24
  101. Text(F25, Center + (B25 * u) + (C25 * v) - (0.1 + (Length[Text[F25]] * 0.1), 0.2)) → H25
  102. Text(F26, Center + (B26 * u) + (C26 * v) - (0.1 + (Length[Text[F26]] * 0.1), 0.2)) → H26
  103. Text(F27, Center + (B27 * u) + (C27 * v) - (0.1 + (Length[Text[F27]] * 0.1), 0.2)) → H27
  104. Text(F28, Center + (B28 * u) + (C28 * v) - (0.1 + (Length[Text[F28]] * 0.1), 0.2)) → H28
  105. Text(F29, Center + (B29 * u) + (C29 * v) - (0.1 + (Length[Text[F29]] * 0.1), 0.2)) → H29
  106. Text(F30, Center + (B30 * u) + (C30 * v) - (0.1 + (Length[Text[F30]] * 0.1), 0.2)) → H30
  107. Text(F31, Center + (B31 * u) + (C31 * v) - (0.1 + (Length[Text[F31]] * 0.1), 0.2)) → H31
  108. Text(F32, Center + (B32 * u) + (C32 * v) - (0.1 + (Length[Text[F32]] * 0.1), 0.2)) → H32
  109. Text(F33, Center + (B33 * u) + (C33 * v) - (0.1 + (Length[Text[F33]] * 0.1), 0.2)) → H33
  110. Text(F34, Center + (B34 * u) + (C34 * v) - (0.1 + (Length[Text[F34]] * 0.1), 0.2)) → H34
  111. Text(F35, Center + (B35 * u) + (C35 * v) - (0.1 + (Length[Text[F35]] * 0.1), 0.2)) → H35
  112. Text(F36, Center + (B36 * u) + (C36 * v) - (0.1 + (Length[Text[F36]] * 0.1), 0.2)) → H36
  113. Text(F37, Center + (B37 * u) + (C37 * v) - (0.1 + (Length[Text[F37]] * 0.1), 0.2)) → H37
  114. Sequence(Sequence[Polygon[A + (k * u) + (j * v), B + (k * u) + (j * v), 6], j, 1, k], k, 1, 8) → pascalOutline
  115. Sequence(RemoveUndefined[Sequence[If[Element[cols, j - 1] ≟ i, j], j, 2, 37]], i, 1, 8) → AllCols
  116. Sequence(RemoveUndefined[Sequence[If[Element[rows, j - 1] ≟ i, ("A" * j)], j, 2, 37]], i, 1, 8) → AllRows
  117. Random(1, 5) → QuestionStickCol
  118. Random(3, 8 - QuestionStickCol) → QuestionStickSize
  119. Sequence((("SetValue(D" * i) * ",false)"), i, 2, 37) → cmdTurnOffAll
  120. Sequence((("RunClickScript(A" * Element[Element[AllCols, QuestionStickCol], i]) * ")"), i, 1, QuestionStickSize) → cmdLevel1Setup
  121. Sequence((("SetValue(E" * Element[Element[AllCols, QuestionStickCol], i]) * ",true)"), i, 1, QuestionStickSize) → cmdLevel1Lock
  122. Join({Take[Element[AllCols, QuestionStickCol], 1, QuestionStickSize], {Element[Element[AllCols, QuestionStickCol + 1], QuestionStickSize]}}) → answerCells
  123. Sequence((("RunClickScript(A" * Element[Element[AllCols, QuestionStickCol + 1], QuestionStickSize]) * ")"), i, 1, 1) → cmdLevel2Setup
  124. Sequence((("SetValue(E" * Element[Element[AllCols, QuestionStickCol + 1], QuestionStickSize]) * ",true)"), i, 1, 1) → cmdLevel2Lock
  125. Polygon(A + ((QuestionStickSize + QuestionStickCol) * u) + ((QuestionStickCol + 1) * v), B + ((QuestionStickSize + QuestionStickCol) * u) + ((QuestionStickCol + 1) * v), 6) → answerBlade
  126. Sequence(Polygon[A + (k * u) + (QuestionStickCol * v), B + (k * u) + (QuestionStickCol * v), 6], k, QuestionStickCol, QuestionStickSize + QuestionStickCol - 1) → answerStick
  127. Join({answerStick, {answerBlade}}) → answerDisplay
  128. RemoveUndefined(Sequence[If[Element[selectableObjects, i], i + 1], i, 1, 36]) → cellsClicked
  129. RemoveUndefined(Sequence[If[Element[selectableObjects, i], Element[F2:F37, i]], i, 1, 36]) → cellClickedValues
  130. Polygon(A + (B37 * u) + (C37 * v), B + (B37 * u) + (C37 * v), 6) → A37
  131. Text(F17, Center + (B17 * u) + (C17 * v) - (0.1 + (Length[Text[F17]] * 0.1), 0.2)) → H17
  132. LaTeX(If[(¬correctSum) ∧ (¬noCellsClicked), (("The cells you chose do not add to the sum of " * sumAnswer / 2) * ".\\"), ""]) → fbWrongSum
  133. LaTeX(If[noCellsClicked, "You did not select any cells.\\", ""]) → fbNoSelection
  134. LaTeX(If[correctNumberCells ∨ noCellsClicked, "", "You have not selected the correct number of cells.\\"]) → fbWrongNumCells
  135. LaTeX(("\text{" * If[level ≟ 1, "Click on Level 2 or 3 for a more difficult challenge.", (If[level ≟ 2, "Click on Level 1 for an easier challenge, or Level 3 for a more difficult challenge.", "Click on Level 1 or 2 for an easier challenge."] * "}")])) → instrucLevel
  136. LaTeX((If[level ≟ 1, (instruc1 * "\\"), (instruc2 * "\\")] * instrucLevel)) → SpecInstruc
  137. LaTeX(If[isCorrect, "also ", ""]) → alsoWord
  138. LaTeX(If[¬correctCells, "Do you notice a pattern made by the cells shown\\in this solution?", "Do you notice a pattern made by the cells in your\\solution?"]) → fbWrongCells
  139. If(isHockeyStick, "", If[isCorrect, "Consider also this solution:\\", "Consider the solution shown:\\"]) → fbConsider
  140. Join({answerStick, {answerBlade}}) → answerOutline
  141. LaTeX(((("\text{" * fbConsider) * fbWrongCells) * "}")) → fbComplete

AI Drawing Prompt Reference

Draw the hockey stick pattern in Pascal's Triangle. Start by drawing a view box, then a hexagon. From two vertices of the hexagon, draw two vectors. Using these vectors, draw a series of new hexagons from each vertex of the original hexagon, with each new hexagon's side length being twice that of the previous one. Finally, calculate and label the binomial coefficients of each hexagon.
The prompt above was compiled from the original drawing commands and is for reference only.