夜市麻将概率与几何模拟

夜市麻将概率与几何模拟
几何画板及绘图内容加载中,请稍等……
2017-03-12 12:29
本范例以夜市麻将游戏为模型,演示随机抽取麻将牌的概率分布与空间几何关系。核心数学概念包括概率论中的随机抽样、二维向量表示牌面位置、锥体与长方体的空间结构。构造要点:运用Sequence命令生成牌堆序列,KeepIf筛选特定条件的牌,Union与Intersection实现牌的集合运算,Translate实现牌的平移动画,Div计算概率比值。通过大量list对象存储牌面数据,carte系列对象表示具体麻将牌,适合高中数学概率统计教学或作为几何概型的生动案例。

GeoGebra 命令及参数

  1. Sequence(Random[1, 36 - k], k, 0, 14) → list1
  2. Element(list1, 1) → carte1
  3. Sequence(k, k, 1, 36) → list2
  4. KeepIf(x ≠ carte1, list2) → list3
  5. Element(list3, Element[list1, 2]) → carte2
  6. KeepIf(x ≠ carte2, list3) → list4
  7. Element(list4, Element[list1, 3]) → carte3
  8. KeepIf(x ≠ carte3, list4) → list5
  9. Element(list5, Element[list1, 4]) → carte4
  10. KeepIf(x ≠ carte4, list5) → list6
  11. Element(list6, Element[list1, 5]) → carte5
  12. KeepIf(x ≠ carte5, list6) → list7
  13. Element(list7, Element[list1, 6]) → carte6
  14. KeepIf(x ≠ carte6, list7) → list8
  15. Element(list8, Element[list1, 7]) → carte7
  16. KeepIf(x ≠ carte7, list8) → list9
  17. Element(list9, Element[list1, 8]) → carte8
  18. KeepIf(x ≠ carte8, list9) → list10
  19. Element(list10, Element[list1, 9]) → carte9
  20. KeepIf(x ≠ carte9, list10) → list11
  21. Element(list11, Element[list1, 10]) → carte10
  22. KeepIf(x ≠ carte10, list11) → list12
  23. Element(list12, Element[list1, 11]) → carte11
  24. KeepIf(x ≠ carte11, list12) → list13
  25. Element(list13, Element[list1, 12]) → carte12
  26. KeepIf(x ≠ carte12, list13) → list14
  27. Element(list14, Element[list1, 13]) → carte13
  28. KeepIf(x ≠ carte13, list14) → list15
  29. Element(list15, Element[list1, 14]) → carte14
  30. KeepIf(x ≠ carte14, list15) → list16
  31. Element(list16, Element[list1, 15]) → carte15
  32. KeepIf(x ≠ carte15, list16) → pu
  33. Sequence(Element[pu, (3 * k) - 2], k, 1, 7) → pu1
  34. Element(pu1, 7) → carte22
  35. Element(pu1, 1) → carte21
  36. Element(pu1, 6) → carte20
  37. Element(pu1, 2) → carte19
  38. Element(pu1, 5) → carte18
  39. Element(pu1, 3) → carte17
  40. Element(pu1, 4) → carte16
  41. Union(list0, v1) → u1
  42. Union(v2, u1) → u2
  43. Union(v3, u2) → u3
  44. Union(v4, u3) → u4
  45. Union(v5, u4) → u5
  46. Union(v6, u5) → u6
  47. Union(v7, u6) → u7
  48. Element(u, a + 1) → list00
  49. Intersection(s1, list00) → t1
  50. Length(list1) → n
  51. Div(Length[t1], 6) → n1
  52. Intersection(s2, list00) → t2
  53. Intersection(s3, list00) → t3
  54. Intersection(s4, list00) → t4
  55. Intersection(s5, list00) → t5
  56. Intersection(s6, list00) → t6
  57. Intersection(s7, list00) → t7
  58. Intersection(s8, list00) → t8
  59. Intersection(s9, list00) → t9
  60. Intersection(s10, list00) → t10
  61. Intersection(s11, list00) → t11
  62. Intersection(s12, list00) → t12
  63. Intersection(s13, list00) → t13
  64. Intersection(s14, list00) → t14
  65. Div(Length[t2], 6) → n2
  66. Div(Length[t3], 6) → n3
  67. Div(Length[t4], 6) → n4
  68. Div(Length[t5], 6) → n5
  69. Div(Length[t6], 6) → n6
  70. Div(Length[t7], 6) → n7
  71. Div(Length[t8], 6) → n8
  72. Div(Length[t9], 6) → n9
  73. Div(Length[t10], 6) → n10
  74. Div(Length[t11], 6) → n11
  75. Div(Length[t12], 6) → n12
  76. Div(Length[t13], 6) → n13
  77. Div(Length[t14], 6) → n14
  78. Translate(Element[cartes, carte1], Vector[(0, 0), ((Mod[carte1 - 1, 6] * 2), (Div[carte1 - 1, 6] * 2.8)) + B_3]) → cart1
  79. Translate(Element[cartes, carte2], Vector[(0, 0), ((Mod[carte2 - 1, 6] * 2), (Div[carte2 - 1, 6] * 2.8)) + B_3]) → cart2
  80. Translate(Element[cartes, carte3], Vector[(0, 0), ((Mod[carte3 - 1, 6] * 2), (Div[carte3 - 1, 6] * 2.8)) + B_3]) → cart3
  81. Translate(Element[cartes, carte4], Vector[(0, 0), ((Mod[carte4 - 1, 6] * 2), (Div[carte4 - 1, 6] * 2.8)) + B_3]) → cart4
  82. Translate(Element[cartes, carte5], Vector[(0, 0), ((Mod[carte5 - 1, 6] * 2), (Div[carte5 - 1, 6] * 2.8)) + B_3]) → cart5
  83. Translate(Element[cartes, carte6], Vector[(0, 0), ((Mod[carte6 - 1, 6] * 2), (Div[carte6 - 1, 6] * 2.8)) + B_3]) → cart6
  84. Translate(Element[cartes, carte7], Vector[(0, 0), ((Mod[carte7 - 1, 6] * 2), (Div[carte7 - 1, 6] * 2.8)) + B_3]) → cart7
  85. Translate(Element[cartes, carte8], Vector[(0, 0), ((Mod[carte8 - 1, 6] * 2), (Div[carte8 - 1, 6] * 2.8)) + B_3]) → cart8
  86. Translate(Element[cartes, carte9], Vector[(0, 0), ((Mod[carte9 - 1, 6] * 2), (Div[carte9 - 1, 6] * 2.8)) + B_3]) → cart9
  87. Translate(Element[cartes, carte10], Vector[(0, 0), ((Mod[carte10 - 1, 6] * 2), (Div[carte10 - 1, 6] * 2.8)) + B_3]) → cart10
  88. Translate(Element[cartes, carte11], Vector[(0, 0), ((Mod[carte11 - 1, 6] * 2), (Div[carte11 - 1, 6] * 2.8)) + B_3]) → cart11
  89. Translate(Element[cartes, carte12], Vector[(0, 0), ((Mod[carte12 - 1, 6] * 2), (Div[carte12 - 1, 6] * 2.8)) + B_3]) → cart12
  90. Translate(Element[cartes, carte13], Vector[(0, 0), ((Mod[carte13 - 1, 6] * 2), (Div[carte13 - 1, 6] * 2.8)) + B_3]) → cart13
  91. Translate(Element[cartes, carte14], Vector[(0, 0), ((Mod[carte14 - 1, 6] * 2), (Div[carte14 - 1, 6] * 2.8)) + B_3]) → cart14
  92. Translate(Element[cartes, carte15], Vector[(0, 0), ((Mod[carte15 - 1, 6] * 2), (Div[carte15 - 1, 6] * 2.8)) + B_3]) → cart15
  93. Translate(Element[cartes, carte16], Vector[(0, 0), ((Mod[carte16 - 1, 6] * 2), (Div[carte16 - 1, 6] * 2.8)) + B_3]) → pic39
  94. Translate(Element[cartes, carte17], Vector[(0, 0), ((Mod[carte17 - 1, 6] * 2), (Div[carte17 - 1, 6] * 2.8)) + B_3]) → cart17
  95. Translate(Element[cartes, carte18], Vector[(0, 0), ((Mod[carte18 - 1, 6] * 2), (Div[carte18 - 1, 6] * 2.8)) + B_3]) → cart18
  96. Translate(Element[cartes, carte19], Vector[(0, 0), ((Mod[carte19 - 1, 6] * 2), (Div[carte19 - 1, 6] * 2.8)) + B_3]) → cart19
  97. Translate(Element[cartes, carte20], Vector[(0, 0), ((Mod[carte20 - 1, 6] * 2), (Div[carte20 - 1, 6] * 2.8)) + B_3]) → cart20
  98. Translate(Element[cartes, carte21], Vector[(0, 0), ((Mod[carte21 - 1, 6] * 2), (Div[carte21 - 1, 6] * 2.8)) + B_3]) → cart21
  99. Element(q, a + 1) → k
  100. Translate(Element[cartes, carte22], Vector[(0, 0), ((Mod[carte22 - 1, 6] * 2), (Div[carte22 - 1, 6] * 2.8)) + B_3]) → cart22

AI 绘图提示语参考

绘制一副麻将牌的随机抽取模拟,包含14张牌和一个牌堆。首先生成一副36张的牌,然后依次抽取14张牌,确保每张牌都不重复。接着将这14张牌分成两组,每组7张,模拟抽取过程。最后将所有牌堆合并,形成一个完整的牌堆。
以上提示语为根据原始绘图命令整理而来,仅供参考。