This block is a continuation of a previous one.
This sequel experiments a way to vizualise the distribution of things (whatever it is) in a horizontal way (ie. along the x-axis), where constraints/objectives are:
- to maintain the exact position of each datum (represented by a circle) along the x-axis
- to be able to hover each circle to show related datum (handle overlapping)
Compared to the previous block:
- this algorithm no longer requires the circles to draw to be x-based sorted. The main ‘drawBeeswarm’ function draws each circle one after each other, as they are listed in its input array.
- this algorithm is ~4 times slower because finding x-based possible colliders is more expensive (previously, gathering x-based possible colliders was easier because circles were arranged in a certain order)
Acknowledgments to: