I have been working a lot in the previous month on my VEX skills and learned a lot about programming in general. On my path to become a VEXpert (haha..), I wanted to create a sim, based on an algorithm. The idea came after watching Entagmas video about space colonization.

So I have decided to make a dream become real and check for algorithms on lightning creation. I have found some “easy” methods, but at the end, there were those two things called "

**Laplace growth**“ and ”

**DBM = Dielectric breakdown model**“. As a former physics student, I wanted to make it real and implement the effect into Houdini.

On my research, I have found a ”fast and easy" algorithm for the

**DBM**on this page: http://gamma.cs.unc.edu/FRAC/laplacian_large.pdf [gamma.cs.unc.edu]

Implementing the algorithm will take a while, because of the special thematic it describes (how does a lightning evolve, and what exactly is the DBM?), but I have first results and added the “core” to Houdini as a solver.

The general DBM algorithm is working as followed:

*1) Calculate the electric potential φ on a regular grid according to some boundary condition.*

2) Select a grid cell as a ‘growth site’ according to φ.

3) Add the growth site to the boundary condition.

2) Select a grid cell as a ‘growth site’ according to φ.

3) Add the growth site to the boundary condition.

**especially:**

*1) Insert a point charge at the origin,*

2) Locate the candidate sites around the charge. On a

square 2D (3D) grid, these would be the eight (twenty-

six) neighbors,

3) Calculate the potential at each candidate site according

to Eqn. 10.

4) Randomly select a growth site according to Eqn. 12.

5) Add a new point charge at the growth site.

6) Update the potential at all the candidate sites according

to Eqn. 11.

7) Add the new candidate sites surrounding the growth site.

8) Calculate the potential at new candidate sites using Eqn.

10.

2) Locate the candidate sites around the charge. On a

square 2D (3D) grid, these would be the eight (twenty-

six) neighbors,

3) Calculate the potential at each candidate site according

to Eqn. 10.

4) Randomly select a growth site according to Eqn. 12.

5) Add a new point charge at the growth site.

6) Update the potential at all the candidate sites according

to Eqn. 11.

7) Add the new candidate sites surrounding the growth site.

8) Calculate the potential at new candidate sites using Eqn.

10.

In my Solver, I have created the boundary conditions for each of the given steps. I have some groups, some attributes, some arrays, calculations and so on.

My lightning follows a path randomly chosen based on the distance to my endpoint, and thats why it, in its current state, doesn't fork. The probability calculation, well both equation 10) and 12) are not yet implemented. I did not fully understand both equations, but after searching for help by my friends, I am able to calculate the potential of each candidate site correctly now, and to calculate the probability “weight”.

After implementing both equations, I will need to overcome one of my biggest problems. I need to work out a method, which allows me to randomly choose a point based on its “weight” of becoming a growing site. This is something I'm currently working out and searching for on the internet. I had a simple idea, which would work with 10-20 points, but won't with 1,5m or more..

In case, there are some math brains outside there, or in case someone knows a site or an expression in VEX which can help, let me know please

Beside of that, I will also need to figure out a good way to render out my lighting, and to not work on a huge grid of 256^3 (~16,8m points), but to only add points to my scene if they are treated as a potential growth candidate.

I will update this post as soon as I am getting forward with the equation. Until now, I have spent nearly 3-4 days on reading about Laplace and DBM, also understanding the faster algorithm, and ~1 day to create my current Houdini scene.

Greetings,

Gyula

ps.: Image shows the current “lightning” on a 2D grid.