noisy line segments helper function