Going a little bigger with the simulation size and following this paper:
Sanal, Rahul. (2014). Numerical Simulation of Dendritic crystal growth using phase field method and investigating the effects of different physical parameter on the growth of the dendrite. https://arxiv.org/pdf/1412.3197
There are a few details I don’t understand in there but the code listing sure helps.
…
Okay first run at translating it to GDScript. Of course it runs slow.
Here’s the output.
Definitely messed something up. Not that it isn’t pretty in its own way.
…
I used atan2(y, x) instead of tan(y/x) when I translated it. I suspect all the sign checking in the source code from the paper was a manual implementation of atan2(). Output looks maybe better?
Still very wrong, of course.
Why is it traveling up and to the left? The seed was in the center of the screen.
Okay, this is looking more promising. Now it looks like the code is correct I just need to tune parameters.