Well, you can search viewport in Google and get much better explanations that I can give, but basically, you have a large graphical area, and you define a window in this area, defined for example by a top-left coordinate and width/height, that define a viewport, the portion of the large graphics that will be displayed on screen. You can move this viewport, that does the pan effect. You can change its size, that does the zoom effect. This concept is quite common in scenegraph-based (another word to search...) toolkits, like JavaFX or, probably, Flash. In Processing, it has to be coded manually, which isn't trivial (but probably not rocket-science either).