Star Polygons by Lenore Horner

Star Polygons by Lenore Horner
Loading the math board and drawing, please wait…
2014-05-02 13:57
In collections Regular Polygons
This GeoGebra example demonstrates how to draw star polygons. What patterns do you see in the polygons? What geometrical questions can you answer about the polygons? This example uses commands like GCD, Sequence, Flatten, and others, suitable for middle school and above students to learn polygon geometry.

GeoGebra Commands & Parameters

  1. GCD(Points, layer) → multiplicityLayer
  2. GCD(Points, skip) → multiplicityOuter
  3. Sequence(((r * cos(((i * 2) * π / Points))), (r * sin(((i * 2) * π / Points)))), i, 0, Points - 1) → Vertexternal
  4. Sequence(Sequence[Segment[Element[Vertexternal, Mod[(j * skip) + m, Points] + 1], Element[Vertexternal, Mod[((j + 1) * skip) + m, Points] + 1]], j, 0, stopOuter - 1], m, 0, multiplicityOuter - 1) → segOrig
  5. Flatten(segOrig) → segUnified
  6. Length(segUnified) → counter
  7. Sequence(Sequence[Intersect[Element[segUnified, i], Element[segUnified, j]], j, i + 1, counter], i, 1, counter - 1) → vertAll
  8. Flatten(vertAll) → vertFlat
  9. Length(vertDefined) → counter2
  10. Zip(Distance[(0, 0), a], a, vertDefined) → radii
  11. Unique(radii) → radiiUnique
  12. Zip(If[x(a) > 0, atan(y(a) / x(a)), If[x(a) < 0, atan(y(a) / x(a)) + π, If[y(a) > 0, 1.5707963267948966, 4.71238898038469]]], a, LayerPts) → LayerPtsAngles
  13. Sort(Sequence[(Element[LayerPtsAngles, i], i), i, 1, Points]) → LayerPtsSorter
  14. Sequence(Element[LayerPts, y(Element[LayerPtsSorter, i])], i, 1, Points) → LayerPtsSorted
  15. Sequence(Sequence[Segment[Element[LayerPtsSorted, Mod[(j * layer) + m, Points] + 1], Element[LayerPtsSorted, Mod[((j + 1) * layer) + m, Points] + 1]], j, 0, stopLayer - 1], m, 0, multiplicityLayer - 1) → LayerSegs
  16. Length(radiiUnique) → layers
  17. Segment(Element[LayerPtsSorted, 1], Element[LayerPtsSorted, 2]) → PointSpacing
  18. Angle(Element[LayerPtsSorted, 1 + (2 * layer)], Element[LayerPtsSorted, 1 + layer], Element[LayerPtsSorted, 1]) → α
  19. LaTeX(((((((("\text{segment length} = 2 (radius)\sin\left(\frac{\pi}{n}layer\right)\cr \text{segment length}=2(" * Element[radiiUnique, layer]) * ")\sin\left(\frac{\pi}{") * Points) * "}") * layer) * "\right)=") * segLength)) → segmentFormula
  20. LaTeX((((((((("angle=\frac{1}{2}(n-2(layer))\frac{360^{\circ}}{n}\cr angle=\frac{1}{2}(" * Points) * "-2(") * layer) * "))\frac{360^{\circ}}{") * Points) * "}=") * angle) * "^{\circ}")) → angleFormula
  21. Segment((0, 0), (2, 0)) → a
  22. Rotate(a, Element[LayerPtsAngles, check]) → a'
  23. Element(LayerPts, check) → checkUnsrtPts
  24. Element(LayerPtsSorted, check) → checkSrtPts
  25. Segment(Element[LayerPtsSorted, 1], Element[LayerPtsSorted, 1 + layer]) → sampleSeg
  26. LaTeX((((((("\textcolor{#CC6600}{\text{angle = " * α) * "}}\cr\textcolor{#CC6600}{\text{point spacing = ") * PointSpacing) * "}}\cr\textcolor{#FF00FF}{\text{segment length = ") * Element[LayerSegs, 1, 1]) * "}}")) → DataReadOut

AI Drawing Prompt Reference

Draw star polygons to illustrate the relationships between their internal angles and side lengths. Start by drawing concentric circles and marking their intersection points, then connect these points to form the star shape. Next, measure the lengths of each side and the angles between them, and label the calculated formulas next to them to show the relationship between side lengths, radii, and angles with the number of sides. Finally, highlight key angle and side length data in different colors to make the figure clear and easy to understand.
The prompt above was compiled from the original drawing commands and is for reference only.