]> Skullheadx's Git Forge - Collision-Simulation.git/commitdiff
make partitions smaller to increase speed
authorSkullheadx <admonty1@gmail.com>
Thu, 26 Jan 2023 22:16:00 +0000 (17:16 -0500)
committerSkullheadx <admonty1@gmail.com>
Thu, 26 Jan 2023 22:16:00 +0000 (17:16 -0500)
collision.py

index 4fd35d3113d2e7c81944a031d9bf46f2657fb02e..ff67a669813157ebd6b9d9de7d71d32db3fad332 100644 (file)
@@ -148,7 +148,7 @@ def remove_duplicates(arr1, arr2):
 
 def spacePartitioning(particle_list, width, height):  # broad phase collision detection
 
-    n = 3
+    n = 25
 
     grid = [[[] for _ in range(n)] for _ in range(n)]