Example of nearest neighbor sampling, non-interactive.