Skip to main content
100%

Polygons

✓ Published2🌍 Public
TTrio-
Last edited Nov 19, 2023
Created on Nov 13, 2023
Forked from D3 Starter

This interactive visualization explores polygon triangulations through codewords, combinatorial representations of how diagonals partition an N-gon. Users can select different N values and codewords from dropdown menus to see the corresponding interior edges drawn as animated paths with staggered stroke-dashoffset transitions. The application uses D3 v7 selections and transitions to animate points, edges, and labels, while codeword generation and geometry calculations are handled by custom JavaScript modules. Colors for interior edges are mapped using `d3.interpolateViridis` based on vertex positions, with buttons to restart or start the animation sequence.

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

Similar vizzes