Enable sample distance control

Sample distance will enable users to set sample distance between
0 - inf