Skip to main content
100%

Spiraling Birds

✓ Published0🌍 Public
TThanaporn-sk
Last edited Mar 9, 2017
Created on Mar 9, 2017

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 description

Built 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>

mit Licensed

Similar vizzes