Segments and Hilbert schemes of points