Locus of a Point at Fixed Distance from a Line Segment

Locus of a Point at Fixed Distance from a Line Segment
Loading the math board and drawing, please wait…
2018-03-23 07:28
①This example demonstrates the locus of a moving point P that maintains a constant distance from a given line segment AB. ②The core mathematical concepts are 'distance from a point to a line segment' and 'locus', involving piecewise definition: within the region above/below the segment, the locus is a pair of parallel segments; beyond the endpoints, it consists of semicircular arcs, forming a capsule (stadium) shape. ③Construction highlights: using GeoGebra commands such as Segment, CircleArc, Ray, Intersect, Distance, along with Mod and If for conditional logic; test point P and a button (button1) toggle visibility of different parts; multiple objects (LP_1~LP_4, C1~C4, diff1~diff4) support verification. ④Suitable for high school analytic geometry or geometric construction classes, to explore locus concepts, piecewise functions, and dynamic geometry; also useful for math labs or competition training.

GeoGebra Commands & Parameters

  1. Mod(a, 720) → m
  2. If(m ≤ 180, (-r * sin(m°), r * cos(m°)), If[m ≤ 360, ((m / 180 - 1) * L, -r), If[m ≤ 540, (L + r * sin(m°), -r * cos(m°)), ((4 - m / 180) * L, r)]]) → P
  3. Segment(A, B) → b
  4. CircleArc(A, LP_1, LP_2) → c
  5. CircleArc(B, LP_3, LP_4) → d
  6. Segment(LP_4, LP_1) → e
  7. Segment(LP_2, LP_3) → f
  8. If(m < 180, (x(A), y(A)), If[m < 360, ((m / 180 - 1) * L, y(A)), If[m < 540, (x(B), y(B)), ((4 - m / 180) * L, y(A))]]) → Q
  9. Segment(P, Q) → h
  10. If(x(P_1) < x(A), (x(A), y(A)), If[x(P_1) > x(B), (x(B), y(B)), (x(P_1), y(A))]) → Q1
  11. Segment(P_1, Q1) → k
  12. Ray(Q1, P_1) → l
  13. Intersect(e, l) → C1
  14. Intersect(d, l, 1) → C2
  15. Intersect(f, l) → C3
  16. Intersect(c, l, 1) → C4
  17. Distance(P_1, C4) → diff4
  18. Distance(P_1, C1) → diff1
  19. Distance(P_1, C2) → diff2
  20. Distance(P_1, C3) → diff3