use points instead of matrix as input