Study on gravitational clustering by N-body simulations