Caterpillar Chase: Dynamic Geometry with Random Motion

Caterpillar Chase: Dynamic Geometry with Random Motion
Loading the math board and drawing, please wait…
2020-11-28 06:09
① This example demonstrates a caterpillar-like figure made of circles whose head chases a draggable point, or moves to random locations in auto mode, creating a chasing animation. ② Core math concepts include coordinate geometry, sequence generation, polygon and polyline construction, and the use of random numbers in dynamic simulations, along with distance calculations and reflection (e.g., boundary bouncing). ③ Construction highlights: Using GeoGebra commands such as Sequence, PolyLine, Point, Segment, Intersect, Polygon, Circle, Distance, and Corner, it builds multiple circles (c1 to c10), a polyline (polyline1), a polygon (poly1), and random points (RandP, RandP1, RandP2), with sliders (speedn) and a button (button1) to control auto mode and speed. ④ Suitable for middle or high school math classes to intuitively understand coordinate tracking, sequence construction, and random motion, and as an introductory example of programmatic geometric construction.

GeoGebra Commands & Parameters

  1. Sequence(((board * cos(((2 * π / numsides) * t))), (board * sin(((2 * π / numsides) * t)))), t, 0, numsides) → l1
  2. PolyLine(l1) → polyline1
  3. Point(polyline1, rand1) → RandP1
  4. Segment(RandP2, RandP1) → randseg
  5. Point(randseg, sin((π / 2 * m))^(2)) → RandP
  6. Intersect(xAxis, yAxis) → Origin
  7. Polygon(l1) → poly1
  8. Circle(P0, P1) → c1
  9. Circle(P1, P2) → c2
  10. Circle(P2, P3) → c3
  11. Circle(P3, P4) → c4
  12. Circle(P4, P5) → c5
  13. Circle(P5, P6) → c6
  14. Circle(P6, P7) → c7
  15. Circle(P7, P8) → c8
  16. Circle(P8, P9) → c9
  17. Circle(P9, P10) → c10
  18. Distance(P0, P1) → dist1
  19. Distance(P1, P2) → dist2
  20. Distance(P2, P3) → dist3
  21. Distance(P3, P4) → dist4
  22. Distance(P4, P5) → dist5
  23. Distance(P5, P6) → dist6
  24. Distance(P6, P7) → dist7
  25. Distance(P7, P8) → dist8
  26. Distance(P8, P9) → dist9
  27. Distance(P9, P10) → dist10
  28. Distance(P10, P11) → dist11
  29. Distance(P11, P12) → dist12
  30. Distance(P12, P13) → dist13
  31. Distance(P13, P14) → dist14
  32. Distance(P14, P15) → dist15
  33. Distance(P15, P16) → dist16
  34. Distance(P16, P17) → dist17
  35. Distance(P17, P18) → dist18
  36. Distance(P18, P19) → dist19
  37. Distance(P19, P20) → dist20
  38. Circle(P10, P11) → c11
  39. Circle(P11, P12) → c12
  40. Circle(P12, P13) → c13
  41. Circle(P13, P14) → c14
  42. Circle(P14, P15) → c15
  43. Circle(P15, P16) → c16
  44. Circle(P16, P17) → c17
  45. Circle(P17, P18) → c18
  46. Circle(P18, P19) → c19
  47. Circle(P19, P20) → c20
  48. Sequence("If(dist" + (Text[t]) + ">link, SetValue(P" + (Text[t]) + ", P" + (Text[t]) + "+ If(link>ripple dist" + (Text[t]) + ", (dist" + (Text[t]) + "-link)vec" + (Text[t]) + ", (1-ripple) (P" + (Text[t - 1]) + "-P" + (Text[t]) + "))))", t, 1, numlinks) → stepfwd
  49. Corner(5) → dims

AI Drawing Prompt Reference

Draw a caterpillar-like figure made of 10 circles, where each circle's center moves along a circular path. Drag a point to make the caterpillar's head chase this point. Alternatively, set a random mode to make the head move randomly along the circular path. Use a slider to adjust the movement speed.
The prompt above was compiled from the original drawing commands and is for reference only.