Need help on speeding up a particle system (or how to ask turtles not to ask other turtles.)
- 阅读更多 关于 Need help on speeding up a particle system (or how to ask turtles not to ask other turtles.)
问题 As a toy, it works well but obviously, when It scales up it bogs down. How can I do this system without asking turtles to ask the other turtles? the code is thus. to go ask turtles [ ask other turtles [ set heading towards myself let D distance myself let C .1 / D - 1 / (D ^ 2) if C > 1 [set C 1] fd C ] ] tick end I should know how to do this but the brain is not working. I will race y'all to the answer and post my own if I get it first. 回答1: You're doing essentially an N-body simulation. The