Spiraling Birds
A swarm of 130 triangular birds spirals toward the mouse cursor against a dark background, with each bird’s color shifting from yellow to red based on its distance from the pointer. The simulation uses d3.forceSimulation with custom forces: forceSpiral steers the flock toward a logarithmic spiral pattern, while forceB applies local cohesion and alignment based on nearby birds within 30 pixels. A forceCollide prevents overlap, and mouse movement resets the simulation’s alpha to 1, restarting the motion. The birds are rendered as SVG paths, with their rotation and fill color updated on each tick.
AI-generated descriptionBuilt with blockbuilder.org
forked from <a href='http://bl.ocks.org/tonyhschu/'>tonyhschu</a>'s block: <a href='http://bl.ocks.org/tonyhschu/713fe6b5ea3c7814da63719bc12c3a1e'>Boid Sort of Works</a>
forked from <a href='http://bl.ocks.org/tonyhschu/'>tonyhschu</a>'s block: <a href='http://bl.ocks.org/tonyhschu/cc0518056e9a7992dc05bea80096ff05'>Spiraling Birds</a>