Page 1 of 1

Particles

Posted: Sat Nov 14, 2020 10:41 pm
by darkfrei
Small project about particles, that can attract and repel each other. Based on the Gravity, but here is more complex rules.

Yes, it looks like some fishes.

Re: Particles

Posted: Sun Nov 15, 2020 5:58 pm
by darkfrei
New version, a lot of changings.

Image
particles-1-03.love
(3.67 KiB) Downloaded 376 times

Re: Particles

Posted: Mon Nov 16, 2020 7:18 am
by NobodysSon
Mesmerizing to watch...

Re: Particles

Posted: Mon Nov 16, 2020 1:27 pm
by ReFreezed
It's close to simulating flocking behavior, except the particles cannot make up their mind about what flock they belong too. :P

Re: Particles

Posted: Tue Nov 17, 2020 5:54 pm
by Germanunkol
This is really cool, they look so alive!
Does the particle size affect the gravitational pull? if so, it would be really cool to see what happens if every now and then one or two very large (one cm?) particles appear, maybe with a very low speed?

Would you care to share what the "more complex rules" are?

There was another cool flocking simulation here a few years ago, that also looked quite cool: https://love2d.org/forums/viewtopic.php?f=5&t=78542

Re: Particles

Posted: Tue Nov 17, 2020 9:15 pm
by darkfrei
Germanunkol wrote: Tue Nov 17, 2020 5:54 pm Would you care to share what the "more complex rules" are?
All particles have same mass by this simulation. See Gravity simulation for various masses: https://love2d.org/forums/viewtopic.php?f=14&t=89764

This rules are not mine, just my implementation of them;

There is 3x9 = 27 types of particles:

Main types A, B, C:
The A attracts to another A.
B has no reaction to another B.
C repels from another C.

There is 9 types of As:
A1 attracts B and C;
A2 attracts B, but no reaction to C;
A3 attracts B, but repels C.

A4 has no reaction to B, but attracts C;
A5 has no reaction to B and C;
A6 has no reaction to B, but repels C.

A7 repels B, but attracts C;
A8 repels B, but no reaction to C;
A9 repels B and C.

Same rules for B1-B9, C1-C9.

The attraction for A will be colored as red 255;
No reaction to A will be colored as red 191;
The repulsion from the A will be colored as red 127.

Same: Reaction B as green color channel, reaction to C as blue color channel.


Thanks for flocking, but it doesn't work on Löve 11.3.

New version just with 135 partickles: