Lattice Polygons

Lattice Polygons
Loading the math board and drawing, please wait…
2015-01-17 00:17
This example explores the relationship between the area of a lattice polygon and the number of interior points, helping students understand polygon area calculation methods. Key mathematical concepts include polygon area, point counting, and geometric construction. It uses commands like Polygon, If, CountIf, Point, and Intersect in GeoGebra. Suitable for middle school and above students to learn polygon area calculation and geometric construction.

GeoGebra Commands & Parameters

  1. Polygon(P_1, P_2, P_3, P_4, P_5) → poly1, b_1, c_1, d_1, e_1, a_1
  2. If(IsInRegion[B, poly1], 1, 0) → b1
  3. If(IsInRegion[C, poly1], 1, 0) → c1
  4. If(IsInRegion[D, poly1], 1, 0) → d1
  5. If(IsInRegion[E, poly1], 1, 0) → e1
  6. If(IsInRegion[F, poly1], 1, 0) → f1
  7. If(IsInRegion[G, poly1], 1, 0) → g1
  8. If(IsInRegion[H, poly1], 1, 0) → h1
  9. If(IsInRegion[I, poly1], 1, 0) → i1
  10. If(IsInRegion[J, poly1], 1, 0) → j1
  11. If(IsInRegion[K, poly1], 1, 0) → k1
  12. If(IsInRegion[L, poly1], 1, 0) → l1
  13. If(IsInRegion[M, poly1], 1, 0) → m1
  14. If(IsInRegion[N, poly1], 1, 0) → n1
  15. If(IsInRegion[O, poly1], 1, 0) → o1
  16. If(IsInRegion[P, poly1], 1, 0) → p1
  17. If(IsInRegion[Q, poly1], 1, 0) → q1
  18. If(IsInRegion[R, poly1], 1, 0) → r1
  19. If(IsInRegion[S, poly1], 1, 0) → s1
  20. If(IsInRegion[T, poly1], 1, 0) → t1
  21. If(IsInRegion[U, poly1], 1, 0) → u1
  22. If(IsInRegion[V, poly1], 1, 0) → v1
  23. If(IsInRegion[W, poly1], 1, 0) → w1
  24. If(IsInRegion[Z, poly1], 1, 0) → z1
  25. If(IsInRegion[A, poly1], 1, 0) → a1
  26. If(IsInRegion[AA, poly1], 1, 0) → aa1
  27. If(Distance[A, a_1] ≟ 0, 1, If[Distance[A, b_1] ≟ 0, 1, If[Distance[A, c_1] ≟ 0, 1, If[Distance[A, d_1] ≟ 0, 1, If[Distance[A, e_1] ≟ 0, 1, 0]]]]) → a2
  28. If(Distance[B, a_1] ≟ 0, 1, If[Distance[B, b_1] ≟ 0, 1, If[Distance[B, c_1] ≟ 0, 1, If[Distance[B, d_1] ≟ 0, 1, If[Distance[B, e_1] ≟ 0, 1, 0]]]]) → b2
  29. If(Distance[C, a_1] ≟ 0, 1, If[Distance[C, b_1] ≟ 0, 1, If[Distance[C, c_1] ≟ 0, 1, If[Distance[C, d_1] ≟ 0, 1, If[Distance[C, e_1] ≟ 0, 1, 0]]]]) → c2
  30. If(Distance[D, a_1] ≟ 0, 1, If[Distance[D, b_1] ≟ 0, 1, If[Distance[D, c_1] ≟ 0, 1, If[Distance[D, d_1] ≟ 0, 1, If[Distance[D, e_1] ≟ 0, 1, 0]]]]) → d2
  31. If(Distance[E, a_1] ≟ 0, 1, If[Distance[E, b_1] ≟ 0, 1, If[Distance[E, c_1] ≟ 0, 1, If[Distance[E, d_1] ≟ 0, 1, If[Distance[E, e_1] ≟ 0, 1, 0]]]]) → e2
  32. If(Distance[F, a_1] ≟ 0, 1, If[Distance[F, b_1] ≟ 0, 1, If[Distance[F, c_1] ≟ 0, 1, If[Distance[F, d_1] ≟ 0, 1, If[Distance[F, e_1] ≟ 0, 1, 0]]]]) → f2
  33. If(Distance[G, a_1] ≟ 0, 1, If[Distance[G, b_1] ≟ 0, 1, If[Distance[G, c_1] ≟ 0, 1, If[Distance[G, d_1] ≟ 0, 1, If[Distance[G, e_1] ≟ 0, 1, 0]]]]) → g2
  34. If(Distance[H, a_1] ≟ 0, 1, If[Distance[H, b_1] ≟ 0, 1, If[Distance[H, c_1] ≟ 0, 1, If[Distance[H, d_1] ≟ 0, 1, If[Distance[H, e_1] ≟ 0, 1, 0]]]]) → h2
  35. If(Distance[I, a_1] ≟ 0, 1, If[Distance[I, b_1] ≟ 0, 1, If[Distance[I, c_1] ≟ 0, 1, If[Distance[I, d_1] ≟ 0, 1, If[Distance[I, e_1] ≟ 0, 1, 0]]]]) → i2
  36. If(Distance[J, a_1] ≟ 0, 1, If[Distance[J, b_1] ≟ 0, 1, If[Distance[J, c_1] ≟ 0, 1, If[Distance[J, d_1] ≟ 0, 1, If[Distance[J, e_1] ≟ 0, 1, 0]]]]) → j2
  37. If(Distance[K, a_1] ≟ 0, 1, If[Distance[K, b_1] ≟ 0, 1, If[Distance[K, c_1] ≟ 0, 1, If[Distance[K, d_1] ≟ 0, 1, If[Distance[K, e_1] ≟ 0, 1, 0]]]]) → k2
  38. If(Distance[L, a_1] ≟ 0, 1, If[Distance[L, b_1] ≟ 0, 1, If[Distance[L, c_1] ≟ 0, 1, If[Distance[L, d_1] ≟ 0, 1, If[Distance[L, e_1] ≟ 0, 1, 0]]]]) → l2
  39. If(Distance[M, a_1] ≟ 0, 1, If[Distance[M, b_1] ≟ 0, 1, If[Distance[M, c_1] ≟ 0, 1, If[Distance[M, d_1] ≟ 0, 1, If[Distance[M, e_1] ≟ 0, 1, 0]]]]) → m2
  40. If(Distance[N, a_1] ≟ 0, 1, If[Distance[N, b_1] ≟ 0, 1, If[Distance[N, c_1] ≟ 0, 1, If[Distance[N, d_1] ≟ 0, 1, If[Distance[N, e_1] ≟ 0, 1, 0]]]]) → n2
  41. If(Distance[O, a_1] ≟ 0, 1, If[Distance[O, b_1] ≟ 0, 1, If[Distance[O, c_1] ≟ 0, 1, If[Distance[O, d_1] ≟ 0, 1, If[Distance[O, e_1] ≟ 0, 1, 0]]]]) → o2
  42. If(Distance[P, a_1] ≟ 0, 1, If[Distance[P, b_1] ≟ 0, 1, If[Distance[P, c_1] ≟ 0, 1, If[Distance[P, d_1] ≟ 0, 1, If[Distance[P, e_1] ≟ 0, 1, 0]]]]) → p2
  43. If(Distance[Q, a_1] ≟ 0, 1, If[Distance[Q, b_1] ≟ 0, 1, If[Distance[Q, c_1] ≟ 0, 1, If[Distance[Q, d_1] ≟ 0, 1, If[Distance[Q, e_1] ≟ 0, 1, 0]]]]) → q2
  44. If(Distance[R, a_1] ≟ 0, 1, If[Distance[R, b_1] ≟ 0, 1, If[Distance[R, c_1] ≟ 0, 1, If[Distance[R, d_1] ≟ 0, 1, If[Distance[R, e_1] ≟ 0, 1, 0]]]]) → r2
  45. If(Distance[S, a_1] ≟ 0, 1, If[Distance[S, b_1] ≟ 0, 1, If[Distance[S, c_1] ≟ 0, 1, If[Distance[S, d_1] ≟ 0, 1, If[Distance[S, e_1] ≟ 0, 1, 0]]]]) → s2
  46. If(Distance[T, a_1] ≟ 0, 1, If[Distance[T, b_1] ≟ 0, 1, If[Distance[T, c_1] ≟ 0, 1, If[Distance[T, d_1] ≟ 0, 1, If[Distance[T, e_1] ≟ 0, 1, 0]]]]) → t2
  47. If(Distance[U, a_1] ≟ 0, 1, If[Distance[U, b_1] ≟ 0, 1, If[Distance[U, c_1] ≟ 0, 1, If[Distance[U, d_1] ≟ 0, 1, If[Distance[U, e_1] ≟ 0, 1, 0]]]]) → u2
  48. If(Distance[V, a_1] ≟ 0, 1, If[Distance[V, b_1] ≟ 0, 1, If[Distance[V, c_1] ≟ 0, 1, If[Distance[V, d_1] ≟ 0, 1, If[Distance[V, e_1] ≟ 0, 1, 0]]]]) → v2
  49. If(Distance[W, a_1] ≟ 0, 1, If[Distance[W, b_1] ≟ 0, 1, If[Distance[W, c_1] ≟ 0, 1, If[Distance[W, d_1] ≟ 0, 1, If[Distance[W, e_1] ≟ 0, 1, 0]]]]) → w2
  50. If(Distance[Z, a_1] ≟ 0, 1, If[Distance[Z, b_1] ≟ 0, 1, If[Distance[Z, c_1] ≟ 0, 1, If[Distance[Z, d_1] ≟ 0, 1, If[Distance[Z, e_1] ≟ 0, 1, 0]]]]) → z2
  51. If(Distance[AA, a_1] ≟ 0, 1, If[Distance[AA, b_1] ≟ 0, 1, If[Distance[AA, c_1] ≟ 0, 1, If[Distance[AA, d_1] ≟ 0, 1, If[Distance[AA, e_1] ≟ 0, 1, 0]]]]) → aa2
  52. CountIf(x < 1, {x(P_1), x(P_2), x(P_3), x(P_4), x(P_5), y(P_1), y(P_2), y(P_3), y(P_4), y(P_5)}) → zahl1
  53. CountIf(x > 5, {x(P_1), x(P_2), x(P_3), x(P_4), x(P_5), y(P_1), y(P_2), y(P_3), y(P_4), y(P_5)}) → zahl2
  54. If(summe ≟ 0, true, false) → gueltig
  55. If(gueltig ≟ true, false, true) → ungueltig
  56. If(gueltig ≟ true, If[a ≟ true, true, false], false) → gueltig1
  57. Point(Circle[E_1, 1]) → F_1
  58. Intersect(a_1, c_1) → S_1
  59. Intersect(a_1, d_1) → S_2
  60. Intersect(b_1, d_1) → S_3
  61. Intersect(b_1, e_1) → S_4
  62. Intersect(c_1, e_1) → S_5
  63. If(Defined[S_1], true, If[Defined[S_2], true, If[Defined[S_3], true, If[Defined[S_4], true, If[Defined[S_5], true, false]]]]) → notsimple

AI Drawing Prompt Reference

Draw a pentagon and then draw several points inside it. Mark these points and check if they are inside the pentagon. Then, calculate the distance from each point to the vertices of the pentagon to determine if each point coincides with a vertex.
The prompt above was compiled from the original drawing commands and is for reference only.