How to diffuse with gradient matrix

9 views
Skip to first unread message

Han Liu

unread,
Jun 9, 2025, 4:27:55 PMJun 9
to GAMA

In GAMA's manual, I observed that diffusion can be performed by customizing uniform/irregular gradient matrices, as shown in the figure.
image
image
But I couldn't find any code that can use gradient matrix to perform diffusion, and when I wrote code it like this:

diffuse var: phero on: cells matrix:mat_grad propagation:gradient;

an error occurred:""matrix:" and "propagation:" can not be used at the same time".

Does this mean that gradient diffusion cannot be performed based on a custom matrix, and can only be executed using parameters such as variation and radius? However, my project requires irregular gradient diffusion, and diffusion based on parameters cannot achieve that complex effect.

So, is there anyone who can help me?

  1. If gradient diffusion can be performed based on a gradient matrix, please provide the correct execution code.
  2. If it is not possible, how can I achieve the effect of my irregular gradient diffusion?

Thank you very much!!!

Reply all
Reply to author
Forward
0 new messages