On the diffusion algorithm for density-equalizing maps with piecewise constant initial data