滑块拼图示例

滑块拼图示例
几何画板及绘图内容加载中,请稍等……
2018-01-07 11:40
①本范例演示了一个滑块拼图游戏,通过拖动方块还原完整图像;②涉及的核心数学概念包括逻辑运算、坐标变换、随机数生成及几何图形绘制;③作图要点运用了Point, PolyLine, Sequence, Polygon, If, RemoveUndefined, CountIf, Random, IndexOf, Translate等GeoGebra命令及points, A, frame, B, D, E, F, G, H, I, J, K, L, M, N, Z, O, button1, C, C_1, Z_1, B_1, A_1, D_1, E_1, F_1, G_1, K_1, J_1, I_1, H_1, L_1, M_1, N_1, O_1, image1, image2, image3, image4, image5等对象;④适合高中数学课堂演示概率统计、几何变换及算法应用,也可用于编程启蒙教学。

GeoGebra 命令及参数

  1. Point(points) → A
  2. PolyLine((0, 0), (8, 0), (8, 8), (0, 8), (0, 0)) → frame
  3. Point(points) → B
  4. Point(points) → D
  5. Point(points) → E
  6. Point(points) → F
  7. Point(points) → G
  8. Point(points) → H
  9. Point(points) → I
  10. Point(points) → J
  11. Point(points) → K
  12. Point(points) → L
  13. Point(points) → M
  14. Point(points) → N
  15. Point(points) → O
  16. Sequence(Segment[(i, 0), (i, 8)], i, 2, 6, 2) → list1
  17. Sequence(Segment[(0, i), (8, i)], i, 2, 6, 2) → list2
  18. Polygon((x(Z) - 1, y(Z) - 1), (x(Z) + 1, y(Z) - 1), (x(Z) + 1, y(Z) + 1), (x(Z) - 1, y(Z) + 1)) → polygon1, a, b, c, d
  19. If(t ≟ 10, false, true) → scramble
  20. Sequence(If[Distance[Z, Element[points2, i]] ≟ 2, Element[points2, i]], i, 1, 15) → closepoints
  21. RemoveUndefined(closepoints) → closepointsclean
  22. CountIf(true, howmany, closepointsclean) → howmany
  23. Random(1, howmany) → i
  24. Polygon((18, 8), (20, 8), (20, 6), (18, 6)) → polygon2, e, f, g, h
  25. IndexOf((3, 7), points) → j
  26. Translate(frame, (12, 0)) → frame'