how to optimize collision in processing.js
in
Processing with Other Languages
•
8 months ago
Hi list, i have a simple program in processing.js where a group of spheres are moving randomly and colliding between them .
For calculating the collision im calculating the distance between all the spheres, the problem is that when i have more than 20 spheres my processing.js app become slow.
I would like to know if there is a way of optimizing the calculation of distance between all the spheres in processing.js
is there is a trick for this?
Seb.
For calculating the collision im calculating the distance between all the spheres, the problem is that when i have more than 20 spheres my processing.js app become slow.
I would like to know if there is a way of optimizing the calculation of distance between all the spheres in processing.js
is there is a trick for this?
Seb.
1