An octree adaptively subdivides 3D space around moving points — dense regions split into smaller cells while sparse regions merge, illustrating how spatial indexing accelerates collision queries and nearest-neighbour lookups.