MINOR: cleaned up code a little ENH: only need makeMirrorLists() when N changes.
MINOR: reduced code duplication, simplified maths for plane case.
MINOR: reduced code duplication (pointInRect).