Implementing Particle Life in Julia? | Graphics Simulator? | Physics Simulator (with visualisation)?

Tom Mohr has shown his implementation of Particle Life


I was wondering if we can do that in Julia since a longgg time! But I just can’t find a graphics library that has real-time rendering (along with some interactivity like adding particles with a mouse click) besides plotting things on an axes plot or static vector graphics. Anything like a dynamic vector graphics library?
Can anyone suggest me libraries and methods to implement such a simulation in julia?

Also another idea at the back of my head…

here me out… Ever since I watched particle life work, I’ve been dreaming about this thing… but have not been able to pull this off. So here is an idea one might try implementing…
What if one creates a simulator and tries to see how particles behave using actual rules? The ones we use in everyday physics, the ones that conserve energy. It would be such an awesome scientific computing project.
What if someday, we discover the actual rules of physics and the correct particle system that can allow us to make systems like particle life, without actually violating Thermodynamical rules?
And even if not, isn’t it nice to just extend the idea of particle life into more things, just as beautiful?

Any help would be appreciated :slight_smile:

a little something I thought of while on the particle life discord…

Well here’s the Idea… You add an electron, 2 up quarks and a down quark into a particle system. You give each of them their respective charges and masses, position and velocity (or any other property they might have) And then you add force vectors based on their properties. Then you play around and research.
What combination of these properties and forces gives you a stable electron field around a nucleus? In other words, what combination gives you something that matches our experimental results/theories?
You can start simply with just an electric force. Then add magnetism, nuclear forces and all that. Wouldn’t it be so fun!

See the entire point is… Particle life isn’t implementing all the rules of complex ecological systems, yet it achieves life-like behaviour with a set of simple rules. What if we can find something similar while simulating the realm of quantum particles?

I’m a bit sceptical about the model itself, but concerning the UI library to use - I have recently had some very good experiences with Makie. It’s not entirely trivial to find in the documentation, but with GLMakie it’s pretty straightforward to create fast and interactive interfaces. There’s also RayLib and SimpleDirectMediaLayer - however, to my surprise, I have found in my own (informal and unscientific) benchmarks that GLMakie is nearly as fast as SDL (which is the faster of the two), while being an order of magnitude more easy to use.

aight, i shall look into it. a lot have people have been pointing me towards that.

Thank you!

You could try Molly.jl to run simulations like these.

It also has simple visualisations with GLMakie.jl, but not real-time or interactive.

1 Like