Medial axis for chamfer distances: computing look-up tables and neighbourhoods in 2D or 3D