in reply to Re^2: Permutation and comparison loop
in thread Permutation and comparison loop

Why reinventing the wheel?

Clipping algorithms are the basis of most computer graphics book.

IMHO Cohen–Sutherland is quite straight forward...

Nota bene: you need spherical geometry to calculate "lines" (great circles) connecting "corners". But then it's the same principle.

Latitudes are not the shortest connections between 2 points!!!

Cheers Rolf