0

I'm trying to implement a Reaction Diffusion Simulation by following this article: https://www.karlsims.com/rd.html. Where I'm running into trouble is the implementation of the 2D Laplacian function mentioned in this diagram: enter image description here

The article later says: "The Laplacian is performed with a 3x3 convolution with center weight -1, adjacent neighbors .2, and diagonals .05." From what I've gathered from a little research, I think the convolution would look something like this:

a b c
d e f
g h i

Convolution = 0.2(b + f + h + d) + 0.05(a + c + i + g) - e

What is a 2D Laplacian, and how would I implement it to work on the result of my convolution? Pseudo-code would be much appreciated.

  • 1
    It looks to me like you've already described the answer I was going to give. Your `Convolution` seems to be exactly ∇²A (or ∇²B, depending on which of the two grids of values you're applying it to) as described in the article (or at least in your excerpt of it). What is it that you're still unsure about? – Ilmari Karonen Jul 23 '21 at 11:15
  • Because the article says to perform the Laplacian on the convolution, I though I might need to do more. It's great to hear that that's all I need to do. Thanks! – Phineas Greene Jul 23 '21 at 15:32

0 Answers0