Fork of Polygons
✓ Published0🌍 Public
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.
AI-generated description<!-- A demonstration of how to start using D3 version 6.
<iframe width="560" height="315" src="https://www.youtube.com/embed/Ia_DwVMXwgk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> -->
MIT Licensed