I've played around with shaders in the past to build particle simulations with millions of points, and it's always really tickled my mind. You basically write functions that operate against a big 2d grid of colors. But because colors are represented by a 4x1 vector [r,g,b,a], you can repurpose this pattern to do general purpose computation (e.g. you can represent a point in a 3D coordinate space as a [r,g,b] color).
You can see this in the codepen in this post. It's literally creating "materials" and "render targets" that are actually just intermediate computation steps in the fluid simulation.
class Fluid {
constructor(context) {
this.context = context;
this.speed = 4;
this.forceInitMaterial = this.createShaderMaterial(forceInitFrag);
this.divergenceMaterial = this.createShaderMaterial(divergenceFrag);
...
this.divergence = this.createRenderTarget();
this.advection = this.createRenderTarget();
...Look up Mark Harris PhD thesis "Real-Time Cloud Simulation and Rendering" for more details.
The AI craze we have today is built on the continuous, sustained work of a huge amount of people over years and years.
https://kyndinfo.notion.site/Sketching-with-Math-and-Quasi-P...
First of all, great article!
Second, there's something weird-but-interesting going on in the quote I've highlighted, above...
First, we have Conway's Game Of Life:
https://en.wikipedia.org/wiki/Conway's_Game_of_Life
To recap, Conway's Game Of Life is sort of like a one array (representing the screen), 2D simulation.
Whereas the above fluid simulation uses two arrays, two maps, in 2D...
My question, my curiosity, is simply this:
What would happen if we used three or more arrays, three or more maps, in 2D?
Like, n-maps, n-arrays (the "higher dimensional generalization" if you will...) to represent things other than velocity...
What would our simulation look like, then?
For example, some interesting things to play with, in this space, might include (but not be limited to, as Lawyers would say!): Acceleration, Jerk, Snap, Crackle and/or Pop:
https://en.wikipedia.org/wiki/Fourth,_fifth,_and_sixth_deriv...
Basically, if velocity is the first derivative of position (and thus should go in the second (n+1) array or map), then maybe other derivatives can go in the higher dimensional map appropriate to them.
Oh sure, they could be computed on-the-fly too... but that's no fun!
In fact, what might be interesting might be to see side-by-side graphics of higher-dimensional maps along with the base-level map, as the simulation (be it Life or Fluid Dynamics or ?) evolves!
What could be discovered?
Well, I as-of-yet don't know obviously... but it seems like these concepts should mesh together somehow...
Anyway, great article!
Also --> those simulations would be pretty sweet screen savers :)
I'm reminded of the occasional notion in cosmology that many mysteries of existence go away if you regard spatial dimensions as emergent phenomenon arising from deeper quantum "degrees of freedom". It makes me think of ancient assumptions - atomos, Arunic kana - that there is a thing - a space, a volume - too small to cut into. But doesn't that seem a little contrived? How can something be too small to divide? I'd propose they're coming at it from the wrong way. It's not the space, it's the fact that it can't be cut any more. The system's freedom of action restricted to a single vector - the future can be constrained no further - and subsequent knife cuts do nothing. The sum of these qualities in maco systems thus, in our minds, resolve into width, depth, length.
Similarly, stack up the CFD stuff fine enough and dense enough, and you get FEA emerging. Now, I'm . . ok, keep in mind I am a layman in absolutely everything . . but it seems like a not-horrible metaphor.