Cash Register: Random Coin Stacking and Geometric Simulation

Cash Register: Random Coin Stacking and Geometric Simulation
Loading the math board and drawing, please wait…
2017-03-01 04:19
In collections Elementary School Applets
① This GeoGebra example simulates a cash register scenario where random coins are generated and stacked within a rectangular area, illustrating the interplay between randomness and geometric shapes. ② Core mathematical concepts include hypergeometric distribution (modeling draws from a finite coin set), random number generation, polygon construction, and volume (via stack height) along with rectangle area. ③ Construction details: uses Point to define coin centers, Polygon to build coin shapes, Shuffle and RandomElement for random selection, Random for stochastic parameters, Intersect for collision detection, and Element/If for conditional logic; objects include numerous points (A, B_4, C_4, etc.) and variables (pennysize, R, S) driven by sliders or random commands. ④ Suitable for middle/high school math or probability/statistics classes, demonstrating random simulation, geometric construction, and distribution concepts, and serving as an introductory example for computational math modeling.

GeoGebra Commands & Parameters

  1. Point(xAxis) → C_4
  2. pennycenter(R_{11}, pennysize) → T
  3. pennycenter(R_{13}, pennysize) → U
  4. pennycenter(R_{14}, pennysize) → V
  5. pennycenter(R_{15}, pennysize) → W
  6. pennycenter(R_{16}, pennysize) → Z
  7. pennycenter(R_{10}, pennysize) → A_1
  8. pennycenter(R_{17}, pennysize) → B_1
  9. pennycenter(R_{18}, pennysize) → C_1
  10. pennycenter(R_{19}, pennysize) → D_1
  11. pennycenter(R_1, pennysize) → E_1
  12. pennycenter(R_2, pennysize) → F_1
  13. pennycenter(R_3, pennysize) → G_1
  14. pennycenter(R_4, pennysize) → H_1
  15. pennycenter(R_5, pennysize) → I_1
  16. pennycenter(R_6, pennysize) → J_1
  17. pennycenter(R_7, pennysize) → K_1
  18. pennycenter(R_8, pennysize) → L_1
  19. pennycenter(R_9, pennysize) → M_1
  20. pennycenter(R_{12}, pennysize) → N_1
  21. pennycenter(O_1, nickelsize) → Q_1
  22. pennycenter(O_2, nickelsize) → T_1
  23. pennycenter(O_3, nickelsize) → U_1
  24. pennycenter(O_4, nickelsize) → V_1
  25. pennycenter(O_5, nickelsize) → W_1
  26. pennycenter(O_6, nickelsize) → Z_1
  27. pennycenter(O_7, nickelsize) → A_2
  28. pennycenter(O_8, nickelsize) → B_2
  29. pennycenter(O_9, nickelsize) → C_2
  30. pennycenter(O_{10}, nickelsize) → D_2
  31. pennycenter(O_{11}, nickelsize) → E_2
  32. pennycenter(O_{12}, nickelsize) → F_2
  33. pennycenter(O_{13}, nickelsize) → G_2
  34. pennycenter(O_{14}, nickelsize) → H_2
  35. pennycenter(O_{15}, nickelsize) → I_2
  36. pennycenter(O_{16}, nickelsize) → J_2
  37. pennycenter(O_{17}, nickelsize) → K_2
  38. pennycenter(O_{18}, nickelsize) → L_2
  39. pennycenter(O_{19}, nickelsize) → M_2
  40. pennycenter(O_{20}, nickelsize) → N_2
  41. Polygon(J_3, K_3, C_4, D_4, E_4, F_4, G_4, I_3, L_3, M_3, A, V_3, W_3, Z_3, A_4, B_4) → poly4, h, r, s, t, f_1, g_1, h_1, i_1, i, j, k, l, m, n, p, q
  42. pennycenter(E_6, dimesize) → D_6
  43. pennycenter(E_7, dimesize) → F_6
  44. pennycenter(E_8, dimesize) → G_6
  45. pennycenter(E_9, dimesize) → H_6
  46. pennycenter(E_{10}, dimesize) → I_6
  47. pennycenter(E_{11}, dimesize) → J_6
  48. pennycenter(E_{12}, dimesize) → K_6
  49. pennycenter(E_{13}, dimesize) → L_6
  50. pennycenter(E_{14}, dimesize) → M_6
  51. pennycenter(E_{15}, dimesize) → N_6
  52. pennycenter(E_{16}, dimesize) → Q_6
  53. pennycenter(E_{17}, dimesize) → T_6
  54. pennycenter(E_{18}, dimesize) → U_6
  55. pennycenter(E_{19}, dimesize) → V_6
  56. pennycenter(E_{21}, dimesize) → W_6
  57. pennycenter(E_{22}, dimesize) → Z_6
  58. pennycenter(E_{23}, dimesize) → A_7
  59. pennycenter(E_{24}, dimesize) → B_7
  60. pennycenter(E, dimesize) → D_7
  61. pennycenter(E_{20}, dimesize) → F_7
  62. pennycenter(G_7, quartersize) → I_7
  63. pennycenter(G_{10}, quartersize) → J_7
  64. pennycenter(G_9, quartersize) → K_7
  65. pennycenter(G_8, quartersize) → L_7
  66. pennycenter(G_{14}, quartersize) → M_7
  67. pennycenter(G_{13}, quartersize) → N_7
  68. pennycenter(G_{12}, quartersize) → Q_7
  69. pennycenter(G_{11}, quartersize) → T_7
  70. pennycenter(G_{18}, quartersize) → U_7
  71. pennycenter(G_{17}, quartersize) → V_7
  72. pennycenter(G_{16}, quartersize) → W_7
  73. pennycenter(G_{15}, quartersize) → Z_7
  74. pennycenter(G_{19}, quartersize) → A_8
  75. pennycenter(G_{20}, quartersize) → B_8
  76. pennycenter(G_{21}, quartersize) → D_8
  77. pennycenter(G_{22}, quartersize) → F_8
  78. pennycenter(G_{23}, quartersize) → I_8
  79. pennycenter(G_{24}, quartersize) → J_8
  80. pennycenter(G_{25}, quartersize) → K_8
  81. pennycenter(G_{26}, quartersize) → L_8
  82. Shuffle(Remove[Flatten[Sequence[Sequence[Point[{i, j}], i, -32, -22, 3], j, 8, 0, -3]], {(-32, 8), (-23, 2)}]) → leftbanklist
  83. Polygon(C_4, B_4, A_4, Z_3, E_4, D_4) → poly1, c_4, b_4, a_4, z_3, e_4, d_4
  84. Polygon(B, C, D, F) → poly2, b_1, c_1, d_1, f_2
  85. Intersect(z_3, e_4) → J
  86. Polygon(J, F_4, W_3, Z_3) → poly3, j_2, f_4, w_3, z_1
  87. Polygon(F_4, G_4, V_3, W_3) → poly5, f_3, g_4, v_3, w_1
  88. Polygon(G_4, I_3, A, V_3) → poly6, g_2, i_3, a_1, v_1
  89. Polygon(H_4, I_4, N_3, U_3) → poly7, h_4, i_4, n_3, u_3
  90. Polygon(J_3, K_3, L_3, M_3) → poly8, j_3, k_3, l_3, m_3
  91. Polygon(K, L, M, N) → poly9, k_2, l_2, m_2, n_1
  92. Polygon(O, P, Q, Q_2) → poly10, o, p_1, q_1, q_2
  93. RandomElement({"gum", "yo-yo", "bottle of bubbles", "top", "candy", "lollipop", "pencil"}) → buying
  94. Element({"1¢", "10¢", "20¢", "50¢", "$1.00"}, u) → maxText
  95. Random(Element[{1, 10, 20, 50, 100}, u - 1], Element[{1, 10, 20, 50, 100}, u]) → cost
  96. If(cost ≟ 100, "$1.00", Text[cost] + "¢") → costText
  97. If(Rtotal ≟ 0, "0¢", If[Rtotal < 100, Rtotal + "¢", "$" + Rhundreds + "." + Rtens + Rones]) → text2
  98. If(cost ≟ Rtotal, "You bought it!", If[cost > Rtotal, "You haven't paid enough.", "You paid too much."]) → checkText

AI Drawing Prompt Reference

Simulate a cash register scenario with randomly generated and stacked coins of varying sizes within a rectangular area to illustrate the interplay between randomness and geometry. Use random numbers to determine coin positions and sizes, construct coin shapes with polygons, and detect collisions to prevent overlaps. Display stacks of different types of coins (like pennies, nickels, dimes) controlled by sliders for size and quantity, demonstrating probability distributions and geometric construction concepts.
The prompt above was compiled from the original drawing commands and is for reference only.