I'm wondering whether this algorithm support integer types or not.
So I ran a test.
Input set: [(19,2),(38,2),(19,7),(38,7),(0,2),(20,2),(0,7),(20,7),(9,7),(38,7),(9,12),(38,12)]
Output set: [(0,2),(38,7),(38,12)]
not so good...
I made a diagram here, https://www.desmos.com/calculator/yvrmis0nwx for your reference.
Red dots are the input set, blue dots are the output set.
Thanks.