flowmap.gl icon indicating copy to clipboard operation
flowmap.gl copied to clipboard

[Feat] Add force directed flow paths

Open ehartford opened this issue 2 years ago • 3 comments

I'm interested in adding force directed flow paths, like this:

image

image

as described in this paper:

Jenny, Bernhard & Stephen, Daniel & Muehlenhaus, Ian & Marston, Brooke & Sharma, Ritesh & Zhang, Eugene & Jenny, Helen. (2017). Force-directed Layout of Origin-destination Flow Maps. International Journal of Geographical Information Science. 31. 10.1080/13658816.2017.1307378.

ehartford avatar Jul 14 '22 04:07 ehartford

Hi Eric! Sorry for the late reply. Somehow I didn't get any notification. Yes, I am familiar with that paper. I would definitely want to at least add curved arrows as a rendering option. Force directed de-cluttering could be a nice addition too. However, it is usually a computationally-intensive task, so I am not sure how well this might work with the dynamic (adaptive to viewport) rendering approach I've taken. Anyways, if are you interested in contributing some of that to the library, I'd be happy to discuss further or see a PR.

ilyabo avatar Dec 07 '22 11:12 ilyabo

It would be fantastic if you could give it a try! I would go with the approach implemented in Flowmapper. In this paper starting on page 17 they discuss their algorithm to construct Bezier curves for a curved half‐arrow: https://www.geo-social.com/docs/Koylu_Tian_Windsor_2021_FlowMapper.pdf Here's their implementation. They did it in SVG. The challenge is to reimplement it in WebGL. This WebGL Bezier curve intro might be of help.

image

ilyabo avatar Dec 07 '22 16:12 ilyabo

Thank you I will do so

ehartford avatar Dec 07 '22 17:12 ehartford