Live data from Hacker News

Flow-field.js – A library for generating flow fields

github.com

11–16 of 16 posts

Re: Flow-field.js – A library for generating flow fields

#13

This is freaking awesome! 2 questions: - Can I set the result as the background of a element? Or does it have to be on a canvas? Either way, an actual usage example in the README would do wonders. - Does anyone know of anything similar like this but in Python?

I added an example to the readme but generally speaking this framework is pretty agnostic and you can use the x, y coordinates in each line with any library

Re: Flow-field.js – A library for generating flow fields

#14

This is freaking awesome! 2 questions: - Can I set the result as the background of a element? Or does it have to be on a canvas? Either way, an actual usage example in the README would do wonders. - Does anyone know of anything similar like this but in Python?

I added an example to the readme but generally speaking this framework is pretty agnostic and you can use the x, y coordinates in each line with any library

Thank you, this is excellent.

Re: Flow-field.js – A library for generating flow fields

#15
post #10

A demo would be great for those with more curiosity than time

Added to the readme but here is a demo https://codesandbox.io/s/flow-field-demo-kkzmg

The GUI library that demo uses is pretty slick: https://github.com/pmndrs/leva

Re: Flow-field.js – A library for generating flow fields

#16
post #2

Looks neat! I'm wondering why/how the first two results pictures (under "Values For num_steps") in https://tylerxhobbs.com/essays/2020/flow-fields have flow lines that are crossing each other. The paths follow a direction field, so that shouldn't happen except where the gradient vector vanishes, which doesn't seem to be the case there.

I love flow fields. They are simple, yet elegant and efficient. They are flexible, which Tyler Hobbs shows very nicely in the linked article.

A few months ago I stumbled over that article, and it made me instantly want to try them out. Here's an experiment I made for my website (WIP):

https://preview.fdumont.net/generative/flow-field

Post reply on HN