Discrete bisector function and Euclidean skeleton in 2D and 3D