N--body simulation