calc_min_dist_box function

Calculate minimum distance to lateral and end walls in a box-shaped experimental tunnel