Fork of Polygons
This example visualizes all valid codewords for an N-polygon, with each codeword represented by a set of interior edges connecting polygon vertices. Users select a codeword from a dropdown menu to see its corresponding geometric interpretation. The visualization animates the drawing of interior edges using stroke-dashoffset transitions, while color mapping interpolates between purple and orange. Built with D3 v7, the code leverages `d3.line`, `d3.transition`, and custom geometry functions to generate polygon points, edges, and codeword-derived diagonals.