Programmatic Painting: Flow Fields
Вставка
- Опубліковано 22 вер 2023
- In this video, we're drawing generative art in the form of flow fields! Flow fields are mathematical structures where every point of a space is associated with an angle, and by carefully choosing those angles, we can trace out the path of particles moving across the field, creating some beautiful images.
=[ 🔗 Links 🔗 ]=
🗣 Discord: / discord
⭐️ Patreon: / lowleveljavascript
💻 Github Repo: github.com/lowbyteproductions...
Man, I almost forgot your channel exists in the noise that is UA-cam - and now I realize there's a dozen of unwatched videos by you, thanks for all the great content!
Glad you found your way back 😁
Sounds like ya gotta hit that bell icon!
Just this morning i was searching for a guide on how to implement this... i guess i have been blessed by the gods of youtube!
Almost like all the arrows lined up and pushed you here? 😉
Reminds flow fields, that can be generated from height field in Gaea, which are used to create realistic terrain.
Thanks a lot, very nice stuff.
thank you for the great content!
This is an amazing video. I might create a twitter bot that tweets images like the ones in the video. There are a lot of variables to randomize and I might add some colors. This might be an interesting project.
Thanks a lot for your inspiring work.
Sounds like a great idea!
Great video, very satisfying results! Thanks for sharing! Quick question: why are the pre-computed flow fields computed at a low resolution? Is it to make the startup quick? I don't think memory is a big consideration here since even at 4k resolution, you're talking 3840 x 2160 pixels * 8 bytes/pixel = 64 MB. I'm not a JS programmer so I don't know if the JIT will vectorize trig functions. At the hardware level, modern processors can issue a scalar sin function in
Wow what a fantastic analysis! Some real Casey Muratori vibes 😄
I'll be honest - I'm not anywhere near familiar enough with JS engine JIT code to give a useful answer on whether it could or could not vectorise the code path. Certainly you wouldn't get the full performance due to other kinds of overhead, but I'm tempted to say that the code could be written in such a way as to generate very fast JITed code (this is after all what asm.js did before wasm was a thing).
But kind of the important thing to mention here is that the field is not computed at a lower resolution because of the cost of the initial computation, but rather because every frame, it has to iterate through the entire field and crunch a lot of numbers. The number of operations performed per frame grows exponentially as the size of the field is increased.
I’m purely just wondering here: why did you choose JS over TS? Great video regardless!
For this kind of free-form creative coding, I don't find TS is really helping me out. Plus in this video I was trying to keep the requirements to a minimum, so no build step.
Don't get me wrong though - I love TS for basically *anything* else.
@@LowByteProductionsthat makes complete sense! It took me a couple years to get a very quick generic TS scaffold setup that I can use when starting projects (I wrote a small cli wrapper). Not everyone has that available so the burden of entry is higher with the tech debt/knowledge required
Now you can't say "first" without it being false.
But what I can say is second ;)