Hacker News new | ask | show | jobs
by tehrash 901 days ago
I wrote an article on the basics of Flow Fields in the context of Generative Art (no AI stuff, just for loops and if cases). It has some fun interactive illustrations and code samples for anyone looking to get into the field.
4 comments

Very nice blog post, thank you for sharing!

I spotted a small error in the Finally, Colors. section:

  const color = floor(random() * palette.length);
...should probably be

  const paletteIdx = floor(random() * palette.length);
  const color = palette[paletteIdx];
ah, of course! thanks for reading and noticing. It's been updated.
Really nice, I love the interactive explanations. We covered flow fields in a chapter for the second edition of our book 'Coding Art' [0]. We use p5.js to match the earlier Processing parts in the book. Btw, Tyler's page is referenced, but yours will be in a future edition. Thanks for writing this up!

[0] https://codingart-book.com

Ah, super cool! Looking forward to reading the future edition!
Very nice article, thanks for posting!

If you don't know about it already, Gorilla Sun has a newsletter that this would be perfect for [0].

[0] https://www.gorillasun.de/tag/newsletter/

My all-seeing eye sees your comment XD definitely including this post in the newsletter!
Cool! Thank you very much!
ha! Of course you're here.

Love your newsletter!

This is very nice! I remember drawing direction fields and integral lines through them in my numerical PDE class but I guess I lacked artistic mindset to push it further :)

I see that some of your generative art i this styles has multicoloured flow lines, is that just random or are the splits computed somehow?

Thanks! Some splits are randomly generated by traversing the line and each point has a small chance (5% or so) to create a split and change color. I've tried other techniques as well where lines change color by which region of the the canvas they are in etc.

I even wrote a small UI using Rust and egui to render the drawings in real-time just to play around with that specific part. It looks like this https://imgur.com/a/Zfp1ls3 and is open source https://github.com/damoonrashidi/generative-art/tree/develop...