Copy of Cat Maze

Copy of Cat Maze
Loading the math board and drawing, please wait…
2018-01-07 19:42
This example demonstrates a dynamic process of generating a cat maze path. It involves core mathematical concepts such as logic, functions, incircle, natural numbers, stochastic processes, and line segments. Key GeoGebra commands used include Sequence, If, Conic, Turtle, Point, Segment, IndexOf, Shuffle, Random, Polygon, Flatten, and Min. It is suitable for high school students and above to explore the integration of random processes and geometric constructions.

GeoGebra Commands & Parameters

  1. Sequence(Segment[(-0.5 + i, -0.5), (-0.5 + i, 9.5)], i, 0, 10) → list1
  2. Sequence(Segment[(-0.5, -0.5 + i), (9.5, -0.5 + i)], i, 0, 10) → list2
  3. If(Mod[orient, 4] ≟ 0, "right", If[Mod[orient, 4] ≟ 1, "up", If[Mod[orient, 4] ≟ 2, "left", "down"]]) → facing
  4. Conic(A - (0.3, 0.3), A - (0.35, 0), A - (0.15, -0.2), A + (0.15, 0.25), A + (0.35, -0.25)) → c
  5. Turtle() → jack
  6. Point({x(jack) + (facing ≟ "right") - (facing ≟ "left"), y(jack) + (facing ≟ "up") - (facing ≟ "down")}) → laserpoint
  7. Segment((x(jack), y(jack)), laserpoint) → laserline
  8. Conic(A_1 - (0.3, 0.3), A_1 - (0.35, 0), A_1 - (0.15, -0.2), A_1 + (0.15, 0.25), A_1 + (0.35, -0.25)) → c_1
  9. Conic(A_2 - (0.3, 0.3), A_2 - (0.35, 0), A_2 - (0.15, -0.2), A_2 + (0.15, 0.25), A_2 + (0.35, -0.25)) → c_2
  10. Conic(A_3 - (0.3, 0.3), A_3 - (0.35, 0), A_3 - (0.15, -0.2), A_3 + (0.15, 0.25), A_3 + (0.35, -0.25)) → c_3
  11. Conic(A_4 - (0.3, 0.3), A_4 - (0.35, 0), A_4 - (0.15, -0.2), A_4 + (0.15, 0.25), A_4 + (0.35, -0.25)) → c_4
  12. Conic(A_5 - (0.3, 0.3), A_5 - (0.35, 0), A_5 - (0.15, -0.2), A_5 + (0.15, 0.25), A_5 + (0.35, -0.25)) → c_5
  13. Conic(A_6 - (0.3, 0.3), A_6 - (0.35, 0), A_6 - (0.15, -0.2), A_6 + (0.15, 0.25), A_6 + (0.35, -0.25)) → c_6
  14. Conic(A_7 - (0.3, 0.3), A_7 - (0.35, 0), A_7 - (0.15, -0.2), A_7 + (0.15, 0.25), A_7 + (0.35, -0.25)) → c_7
  15. Conic(A_8 - (0.3, 0.3), A_8 - (0.35, 0), A_8 - (0.15, -0.2), A_8 + (0.15, 0.25), A_8 + (0.35, -0.25)) → c_8
  16. Conic(A_9 - (0.3, 0.3), A_9 - (0.35, 0), A_9 - (0.15, -0.2), A_9 + (0.15, 0.25), A_9 + (0.35, -0.25)) → c_9
  17. Conic(A_{10} - (0.3, 0.3), A_{10} - (0.35, 0), A_{10} - (0.15, -0.2), A_{10} + (0.15, 0.25), A_{10} + (0.35, -0.25)) → c_{10}
  18. Conic(A_{11} - (0.3, 0.3), A_{11} - (0.35, 0), A_{11} - (0.15, -0.2), A_{11} + (0.15, 0.25), A_{11} + (0.35, -0.25)) → c_{11}
  19. Conic(A_{12} - (0.3, 0.3), A_{12} - (0.35, 0), A_{12} - (0.15, -0.2), A_{12} + (0.15, 0.25), A_{12} + (0.35, -0.25)) → c_{12}
  20. Conic(A_{13} - (0.3, 0.3), A_{13} - (0.35, 0), A_{13} - (0.15, -0.2), A_{13} + (0.15, 0.25), A_{13} + (0.35, -0.25)) → c_{13}
  21. Conic(A_{14} - (0.3, 0.3), A_{14} - (0.35, 0), A_{14} - (0.15, -0.2), A_{14} + (0.15, 0.25), A_{14} + (0.35, -0.25)) → c_{14}
  22. Conic(A_{15} - (0.3, 0.3), A_{15} - (0.35, 0), A_{15} - (0.15, -0.2), A_{15} + (0.15, 0.25), A_{15} + (0.35, -0.25)) → c_{15}
  23. IndexOf(laserpoint, icelist) → iceindex
  24. Shuffle(Remove[Flatten[Sequence[Sequence[(i, j), i, 0, 9], j, 0, 9]], {(0, 0)}]) → list5
  25. Random(1, 16) → icenumber
  26. Random(1, 16) → stonenumber
  27. Polygon((0.5, -0.5), (0.5, 0.5), (-0.5, 0.5), (-0.5, 9.5), (-0.5, 9.5), (9.5, 9.5), (9.5, -0.5)) → region, a, b, d, e, f, g, h
  28. Polygon((-0.5, -0.5), (-0.5, 9.5), (9.5, 9.5), (9.5, -0.5)) → background, i, j, k, l
  29. Flatten(Remove[Join[{{Sequence[Sequence[(i, j), i, -1, 10, 1], j, -1, 10, 11], Sequence[Sequence[(i, j), i, -1, 10, 11], j, 0, 9]}, icelist, stonelist}], meltedice]) → alltowers
  30. Min(RemoveUndefined[Sequence[If[Defined[IndexOf[jack + ((laserpoint - jack) * i), alltowers]], i], i, 1, 5]]) → blockage

AI Drawing Prompt Reference

Draw a dynamic cat maze path generation, featuring a 10x10 grid and a random path. The path consists of multiple line segments starting from the bottom-left corner and ending at the top-right corner. The path generation involves random direction selection (up, down, left, right) and leaves traces on the grid. The path is created based on random numbers and conditional logic, forming a maze-like trajectory. The background is white, grid lines are black, and the path is blue.
The prompt above was compiled from the original drawing commands and is for reference only.