extract points in an interval