untested spiral sampling function.