Cat's Maze

Cat's Maze
Loading the math board and drawing, please wait…
2016-01-07 23:03
This example demonstrates a maze made up of multiple isosceles triangles. It involves concepts such as isosceles triangles, arithmetic mean, and inequalities. Using GeoGebra commands like Sequence, If, Conic, etc., a dynamic maze can be constructed. Suitable for middle school and above students to learn geometric construction and inequality-related knowledge.

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, {(9, 9), (0, 8), (7, 3), (5, 0), (3, 2), (7, 9), (1, 0), (9, 3), (7, 6), (8, 4), (6, 3), (7, 0), (8, 8), (6, 1), (7, 5), (6, 0), (2, 3), (4, 8), (1, 4), (0, 3), (8, 1), (6, 7), (5, 1), (2, 8), (8, 2), (4, 3), (0, 7), (4, 9), (6, 6), (9, 6), (7, 4), (1, 5), (3, 1), (5, 3), (1, 2), (7, 8), (4, 4), (4, 1), (2, 7), (2, 1), (6, 5), (4, 7), (3, 3), (9, 8), (6, 9), (3, 7), (2, 4), (3, 5), (9, 7), (9, 4), (3, 0), (2, 5), (8, 5), (4, 5), (1, 3), (2, 0), (4, 2), (5, 9), (9, 2), (2, 6), (0, 9), (9, 0), (5, 5), (1, 6), (3, 9), (5, 7), (8, 7), (0, 4), (5, 6), (0, 6), (0, 2), (7, 2), (1, 9), (5, 2), (6, 2), (9, 1), (5, 4), (0, 1), (3, 4), (8, 6), (9, 5), (8, 3), (2, 2), (1, 8), (3, 8), (4, 6), (0, 5), (1, 7), (7, 7), (5, 8), (6, 8), (4, 0), (6, 4), (1, 1), (3, 6), (7, 1), (2, 9), (8, 9), (8, 0)}
  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

Create a maze made up of multiple isosceles triangles. Start by drawing horizontal and vertical lines to form a grid. Then place isosceles triangle vertices as obstacles randomly on the grid. Next, let a ball move along a path, using line segments to represent laser paths. Finally, randomly generate some ice blocks, whose positions cannot be directly passed by the laser path.
The prompt above was compiled from the original drawing commands and is for reference only.