From: Skullheadx Date: Thu, 26 Jan 2023 22:16:00 +0000 (-0500) Subject: make partitions smaller to increase speed X-Git-Url: http://git.skullheadx.com/projects/dotfiles.html?a=commitdiff_plain;h=8ca79d66032fa0e633905723719e86b9a1bb9800;p=Collision-Simulation.git make partitions smaller to increase speed --- diff --git a/collision.py b/collision.py index 4fd35d3..ff67a66 100644 --- a/collision.py +++ b/collision.py @@ -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)]