Physics, Science, Programming, Deep Dives, Thoughts And Theory.
np.array(self.box_dim) #If wall collisions present if _wall_diff[_wall_diff>=0].shape[0] > 0: #Increment collision counter self.wall_collisions+=1 #Check whether collision in x or y direction _coll_ind=np.argwhere(_wall_diff>0) #For component(s) to be reflected for c in _coll_ind: #Reflect velocity