Polygons (#6)
Jonathan Frech
Using my getCirclePos()
function, I thought of not only creating a circle. Dividing 360° by 𝑛, you get 𝑥°. Now 𝑥° is a 𝑛-th of a circle. If I connect 𝑛 points with each other, always adding 𝑛° and starting from 0°, I get a 𝑛-gon. “Polygons” does exactly this. The minimum 𝑛-gon-count is 3, the maximum 1000.
Usage
- “w” increases the polygon point count,
- “s” decreases up the polygon point count,
- “Up” does what “w” does, but you can hold it,
- “Down” does what “s” does, but you can hold it,
- “r” starts the random movement (polygon count changes randomly).



Source code: polygons.py
- pingback from #8