Rotating Shape Transitions
A polygon rotates continuously on a turntable-style backdrop, cycling through a sequence of geometric shapes while colored dots and connecting lines trace the path of each vertex between shapes. A vertical slider controls the rotation speed, displayed as revolutions per minute, with the shape pausing when the slider is set to zero. The animation relies on the custom d3-shape-tween library to interpolate between polygons of different vertex counts, adding points along edges as needed, and draws blue "wire" lines from old vertices to new ones to clarify the transition.
AI-generated descriptionPartially an update to one of <a href="http://bl.ocks.org/alexmacy/06cf037853999219cd82bc79edc4aee6">my previous blocks</a>, the original intention here was to more clearly convey what is happening during the transitions between shapes by drawing lines from the vertices of the old shape to those of the new shapes.
It uses a kinda-sorta add-on I made called <a href="https://github.com/alexmacy/d3-shape-tween">d3-shape-tween</a>, which helps smoother transitions between complex shapes, especially when transitioning between shapes of varying complexity.
I also had some fun experimenting with rotating the shape as if it's on a turntable...