Yet another variation (personal favorite; remindsreminds me of cellular automata):
Yet another another variation (new personal favorite):
public int compare(Point t, Point t1) {
int compareVal = (Integer.bitCount(t.x ^ t.y))
- (Integer.bitCount(t1.x ^ t1.y));
return compareVal < 0 ? -1 : compareVal == 0 ? 0 : 1;
}
It looks so fractal-ly. XOR is so beautiful, especially closeup:
Another closeup: