-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Distance-based force #20
Comments
Interesting! That may explain why there was sub-atomic look-like behavior in some demos. Though I think constant forces might exist at higher levels too especially in small viscous spaces. Anyway, thanks for the suggestion, I'll try them when I have time and would like to see your results too if you could share them. Thanks. |
I think the constant forces essentially mean that each particle looks for nearby particles and moves towards (or away from) the "center of mass". This reminds me of flocking, which has rules for creatures to look for nearby creatures and try to move towards them or away from them. |
I believe that would make the simulation a plain old nBody simulation that would remove the uniqueness of this software. |
Hi! I was thinking of suggesting that you introduce a matrix of the radii of action of each particle interaction. For example, if the interaction matrix states that red attracts red with a force of 0.27, it should also state that this interaction only takes place over a maximum distance of 50. In the program I saw that there is a possibility to set the action radius for a particular color, but it is for the interaction between that color and any other, but it would be more interesting to set one for each other color. |
you mean something like this ? |
Yes. Basically it would be a combination of Tims Insane Meta Universe and Particle Life. |
Well my screenshot is from the C++ version of particle life :) (i optimized it since the video, it run at 90FPS on my laptop now) |
Wow, you really have found some interesting patterns especially the one at 13:19 and 14:10. You should have put some music with it. |
The current simulation applies a force that is independent of distance. If the distance is 3 or 30 the force applied is the same.
or
There is a force that does not depend on distance, and then stops at some threshold; it is the Strong force, but it is mainly for the quarks inside an atom nucleus, not for artificial life. It would be interesting to use some force that depends on distance, because that would apply to real life forms. Maybe 1/d² (gravity, electromagnetism in a 3d world), 1/d (gravity or electromagnetism in a 2d world), van der waals force which can take into account the size of the particles, or Lennard-Jones which is the force between molecules. The interesting thing with Lennard-Jones is that at close distances it pushes molecules apart and at far distances it pulls them closer. This can create really interesting patterns. There is also a generalization of Lennard-Jones called Mie potential that might be useful for adapting Lennard-Jones to work in 2d.
Before you try these, I have to warn: I did try some of these and I think it will be a bit of work. It is easy to change the formula in the code. But I think all the other numbers in the code like the 0.5 and the -100 to +100 values and the G / -100 are all designed to work with the original distance-irrelevant force, and I think all of those would have to be somehow tweaked to handle distance.
The text was updated successfully, but these errors were encountered: