Tuesday, July 11, 2023

Markov-Chains in VoroX

For VoroX.jl Benoît build a system that is similar to Google’s PageRank that uses Markov Chains, where web-crawlers are released onto the internet to measure the connections and generate rating of sites.

In his system there's an amount of traffic released into the Voronoi-edges of the foam, these pulses move from the edges to the junctions and check if the gates are open or closed. 

When a gate is open a pulse moves on to the next gate and so forth. These ‘ratings' correspond to the current in each edge between the cells and define if a cells shrinks or expands. The particles move until they reach a Steady-State, as in Nick’s 2D Dynamic Foam model:

If you’re not familiar with Markov-Chains, this video from Khan academy explain it in 3 minutes:

So in VoroX.jl dogs/pulses/web-crawlers move to other rooms/edges/websites when there’s an open-door/gate//link. 

After a couple of iterations a Steady-State is reached and we can count the dogs/flow/connections.

These values lets us know how much ‘erosion' the flow in an edge (a-c) has caused to its neighboring cells A and D, and as such the contraction-value for its dual edge A-D.


Details from the control panels of the 2D Dynamic-Foam
 that might make more sense now:

• Energy, Scale and Critically 

This refers to the number of particles/pulses are put into the system and their size.

 • Circumcenter / Barycenter / Incenter 

Refers to the method used to create the dual Voronoi Mesh on top of the Delaunay Mesh.

• Expansive Flow / Contractive Flow

Particles in Voronoi-edges (a-c) expand OR contract Delaunay-edges (AB).

Details from theVoroX.jl control panels of the 3D/2D Dynamic-Foam program where the particles are replaced by a Markov-Chain value system:

set size of the Area

Point size, Center size, Edge width, Circuit width: 
visualisation properties

time a current in edges stays highlighted

Shading for the faces.


Wednesday, June 21, 2023

Processing Schemes & Diagrams


There’s a foam where flow runs through the edges, the angles of the junctions regulate if flow can pass or is not, the amount of current in an edge defines if its neighboring cells grow or shrink, like a river sedimentation vs erosion. 

Scheme I : Technical setup

1. Random Poisson distribution (or Blue Noise) of points that fills the area.
2. Build the Delaunay Triangular Mesh with these points (see ref. Alterntives for Voronoi Diagrams)
3. Calculate the Barycenters/Centroids.
4. Build the Dual Voronoi Mesh.
5.a. Send pulses from the edges of the Voronoi Mesh in both directions.
5.b. Calculate from the triangles which Angles/Gates/Connections are:  Open (I) > 90° or Close (0) < 90°
5.a./5.d. Keep forwarding the pulses through the edges so we get a current-value for each edge (until we reach a Steady-State).
6. The results of (5.a.) gives us the value of how much the Delaunay-edges should contract or expand (similar to a Mass-Spring system).

-> Now we are full-circle and we have new positions for (1.) and (2.), and we can draw a new set of (3.) Centroids and redo the whole process.

Scheme 2 : Divide Large Mesh in Small Blocks

Maybe we can cut up the ‘Global Mesh' in smaller blocks that can be easily parallel computing on the GPU, where the a edges fo the Global Grid/Mesh are separated into small blocks that have a Local ‘virtual’ Grid and are easy to process individually to be send back to the Global Mesh.

Scheme 3 : Iteration of Global Backbone and Local Blocks

The mesh could be divided into one Global horizontal strip with small Local blocks:

Y0 / Y1 / Y2 / Y3 / …

At each iteration there’s a vertical process where each block can figure out it’s local connectivity status, the results are fed into a Global graph that uses a Morkov-Chain process to figure out the connectivity ‘flow’ state of each connection, just like how Google’s Page-Rank works, and the results are fed back into the Global mesh.

Step 1 / Step 2 / Step 3 / ...

Sunday, April 30, 2023

OpenAI / Chat GPT Spiralled Torus as logo

 Cool to see that the hottest and most advanced company at the moment is using 'our' spiralled torus for their logo.

Sunday, March 26, 2023

3D *Simi* Dual Mesh with Compute Shader in Unity

Last year we got somewhat stuck with the upgrade of the 3D Dynamic Foam program in Julia (Voro-X) to a more performant 2.0 version. The reason is that there is no CGAL version (yet) for Julia to use as the backbone. 

So I decided to explore if a Compute Shader might be an option, because shaders use the full power of GPU's and can significantly increase the speed of simulations.

As such I got in touch with Polish developer Przemyslaw Zaworski to see if it was possible to get the Dynamic Foam model running with a Compute Shader in Unity.

The result is a *semi* 3D Dual Mesh simulator with a Delaunay Triangles/Tetrahedrons basis out of which a Semi-Voronoi-Mesh is distilled using the Jump Flooding Algorithm (JFA):


It is a *Semi* mesh because the Voronoi mesh is only a pixel/voxel-mesh and not a 'real' mesh made out of a conglomerate of points, edges and faces. As such it cannot be used to setup the interaction model between the two complimentary dual meshes (Delaunay/Voronoi). Perhaps in the future an actual Voronoi mesh can be extrapolated from the semi-Voronoi-mesh.

Here's a compilation video with more examples of the simulator:

An other option worth exploring might be Mesh-shaders

Saturday, December 10, 2022

Fig. 8 Logo Qatar World Cup 2022

Cool to see that also the World Cup Football (soccer) in Qatar is using the fig. 8 as their logo. This will broaden the acceptance/understanding of this fig. knot/wave.

The great thing is that they also have an animation similar to what I've published, coming from a linear line forming into an O/8.

Here's the promotion video that's being played during the games:

It will start to give a massive amount of people a sense of the concept of how Photon (8) can be absorbed by an Electron (O) and emitted out again to form a new (8). As shown in this older storyboard of when I was still focussed on having the knots emerge within gas of particles instead of a Dynamic Foam.

Monday, February 21, 2022

3D Voronoi Cells - Dynamic Foam - 'Pneumatic Model' - Houdini

 Previews of simulations made by Dan Wills made in Houdini with a model focused on the angles.

Monday, December 20, 2021


The past months I have been in contact with MIT postdoc Benoît Legat a mathematician in numerical geometry, who has converted the 2D DynamicFoam model, developed by an other MIT affiliate Nick Weigert, into a 3D application:


The name stands for Voronoi diagrams (foam) where energetic currents run through the edges of the mesh, and X-ings (junctions) that act like a gates where currents are switched OFF or ON based on the sharpness of the angles. (0/I)

The level of current passing through the edges, has river-like effects where 'sedimentation' makes the cells grow; and 'erosion' makes them shrink. The changes of the cell-size changes the angles, and thus the direction of the currents: currents can switch. This whole interaction model based on a few rules generates a CA type of Dynamic Foam.

Voro-X is build with the programming language Julia and you can download the program here:




Voro-X compared to Nick's 2D DynamicFoam (see Wiki-page):

  • The criticality used is equivalent to an infinite criticality and cannot be changed.
  • If "Edge scale" is on, the dynamics is equivalent to DynamicFoam: it scales the edges. If it is off, it scales delaunay simplices.
  • The "Height" setting changes the height of the rendering frame but does not influence the dynamics. The points are are samples in a fixed square or cube that cannot be changed.
  • The "Periodic" setting determines whether the meshes is considered infinitely periodic along each directions.
  • The "Voro shading" determines whether the Voronoi cells are displayed (if it is on) or the Delaynay cells (if it is off). The transparency of the shading is determined by the "Transparency" setting.



The program works on Windows, Mac and Linux, 

but you first need to install Julia.


Next dowload and unzip the Voro-x package/repository:


Decompressed the package and rename it to for instance: Desktop/VoroX

Launch Julia and you get the prompt:


Type ] so that the prompts becomes:

(@v1.7) pkg>

(Note, backspace '<-' will bring back the julia> prompt )

Next activate VoroX.jl by typing:

(@v1.7) pkg> activate ~/Desktop/VoroX 

(or via an other directory/name where you have placed the VoroX folder)

Now install its dependencies as follows:

(VoroX) pkg> instantiate

The installation will take a while.

 Once this is done, to launch the software in Makie.jl, with K points and N dimensions (K, N), switch back to 'julia' by using 'backspace' and type:

julia> using VoroX

and finally the last command:

julia> foam(10, 3)

(This might take a longer time to load: 5 to 10 min.)

Note that N can only be 2 or 3 (for 2D or 3D)


See screenshot for how it looks in the Terminal on my Mac,

 all in all it are just 4 input lines in Julia:

(@v1.7) pkg> activate ~/Desktop/VoroX

(Vorox) pkg> instantiate

julia> using VoroX

julia> foam(20, 3)

There are are bunch of different settings to play with. Note that setting 'Transparency' of the sides to zero, and switching off the 'Periodic' boundaries, makes the program run much faster.



Next up is scaling this system up, to run with millions/billions of cells, get rid of some of the bugs, use optimum shading to visualise the foam and look for emergent pattern, knots!

Saturday, December 18, 2021

Teaser 2 : DynamicFoam 3D BioCells - The Big Bang

Fig. 8 Knot Used as Facebook's 'Meta' logo

Have you peeps seen the new FaceBook ‘Meta’ logo?


It is like my 8-knot concept: a U-shape also turning into an 8 

I had this already posted 12 years ago on my blog, check also my top banner:

Spiral windmill reference on my 800.000.000 YouTube-blog: