Thursday, September 16, 2021

Python Particle Simulation

 I have started working on a particle simulator in python.  I have limited knowledge of Quantum Mechanics, but thinking about the weird way particles and entanglement work has lead me to some ideas that I want to try in a computer simulation of particles.  My idea is that certain properties not existing, or being described by probability functions will allow the simulation to run very fast with large numbers of particles.

I have been thinking about this for several years and made other attempts to get started. The current attempt is the furthest I have ever gotten. I have finally gotten it clear in my head what I want to do.

I am going to setup an array of particles.  Each particle will have a position and a direction.  When 2 particles interact I will optionally create more particles and select new directions for each particle.  At that point I will, using the direction of each particle, look for future interactions with other particles.  These interactions will go onto a queue that will be processed starting with the earliest event in time.

My thought is that doing this will mean that I only need to loop over the particles when an interaction happens, not for every frame like you would in a traditional animation type program.

I still haven't worked out all the details.  It is possible that it just doesn't work, or doesn't make sense in some way.

No comments:

Post a Comment


  I'm not sure where I heard this, and it wasn't worded this way, but it helps to think about coding this way. Basically, any progra...