A new ’slightly’ different approach that might be a lot easier to process the Dynamic Foam:
Instead of doing a search along the edges, where the acute angles (sharp < 90°) are the regulators ... we might get the same result by calculating the acute angles and ‘mark' the cells. Similar to Conways Game of Life.
The idea is that a tree search is equivalent to counting the surrounding cells, in both cases the same 'effect of the sharp corners’ in the foam is sensed and applied.
I. Previous models : Monte Carlo - and Local Edge Search
• Find Sharp-angels and mark the corners.
• Unique tree-search for each edge to define the Weight of each cell edge.
• Sum of all weights = > New Pressure.
• Balance out cells based on their new pressures and draw new Voronoi-Layout, with Power-Voronoi-tracking-cells*.
--
II. Future model : Acute Angles Counting / Sub Cells
• Detect Acute Angles
• Acuteness : Count Acute-angels per cell (0, 1, 2, 3)
• Color the whole cells depending on the acuteness value.
• Sum of all marked adjacent Sub-cells => New Pressure.
• Balance out cells based on their new pressures.
Like in Game of Live.
————
Shadertoy tests:
• Sharp acute angles (<90°) are marked white.
• Based on N° of interior acute angles (1, 2, 3) the Voronoi cells change light yellow to dark orange.
• Blue Voronoi cells have no acute angles.
Voronoi Cell Volume is regulated by number of 'adjacent' acute angles.
• Acuteness = acute angles (<90°) per Cell
• Cell Volume is regulated by Acutess: (0,1) increase <-> (2,3) decrease
• Cell color = Acuteness: 0 = White, 1= Blue, 2 = Red, 3 = Black
The relation to GoL is that in GoL we count the 'living' adjacent cells to define if a cell lives (increases) or dies (decreases). Here we count the number of acute-angles ‘around’ each cell,
There are only 4 ‘acuteness’ levels possible: 0,1,2,3
When it's (0,1) the Volume of the cell increase / lives <-> (2,3) the cell decrease / dies.
Like in GoL cells ‘live’ or ‘die’ depending on the organisation of its neigibours.
There's a ‘physical’ and a 'mental' part to this:
• Physical: circular-particles that can increase or decrease, and push each other away. The centers of these circular-particles are used as the Centroids of the Voronoi mesh on top of it. You can see cicular they are light transparent black.
• Mental: On top of the physical circular-particles is a Voronoi-mesh, that uses the centers of those circular-particles as centroid. Next for each Voronoi-cell we calculate the number of acute angles, and use these values to color the cells. We also feed this result to the 'physical' circular-particles, so they know how much they need to increase or decrease. Noter, we set an upper and lower bound, otherwise the sim explodes.
Result: The physical circular-particles change in size. -> They pushed each other. -> New Voronoi layout. -> New acuteness values for the cells. -> The physical circular-particles change in size -> Et c’est parti! -> C’est la vie! 😀
PS
Blue noise distribution of the particles is for a ‘natural’ random distribution at the start, instead of Poison distribution. If we use for instance an symmetric array that gives us all clean tiled Voronoi cells with zero acute angles, then they all would decrease into a hole, it would be like starting GoL off with a block of black cells that all die.
--
The plan is now to use Voronoi-Tracking and introduce:
*Power-Voronoi-tracking-cells
The idea to adjust 'relatively' the Voronoi-particle-tracking pixels (texels)
related to the Volume value of the particles to adjust
the size of the tracking Voronoi Cells.
To be continued ...