Problem with spring force in growth algorithm

Hi @solub,

I tried to mess around with it but I don’t know ToxicLib and never used Python before so you can imagine I did not have lots of success ^^

But, I may have some leads for you (maybe):

  • When you create a new cell and compute the new location, I added +5 in the scale factor so the new particule is not overlapping the old one.
  • I displayed each particles as sphere instead of point and deleted the triangles to have a better view of what was going on and I noticed that when the particles are at a resting place (I limited the number of cells to be 2) they are not touching each others. So there is probably something wrong with the way the springs are working.
  • Something that I don’t understand is that you add some string but you also add some behavior. Shouldn’t be the strings enough ?
  • I locked the initial particle so it will never move because when playing with the strings and behavior the particles started to fly all over the place…

Also, one thing that annoyed me is that it seems that the simulation and the display are linked together. I wanted to create a mousePressed function in which I could add a new particle anytime I want and just keep the simulation running in the draw loop but I couldn’t do it.

1 Like