Camera & Projection
Two independent matrices: the camera (view — where the eye is and what it's looking at) and the projection (perspective vs. orthographic, field of view, clipping planes). Both start at Processing's own defaults and stay set until changed.
On this page · 6 entries
Camera
Camera()Camera(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ)
No-arg resets to Processing's default view — eye pulled back from the canvas center, looking straight at it, +Y up. The 9-argument form positions the eye explicitly, looking at center, with up as the up direction.
Perspective
Perspective()Perspective(fovy, aspect, zNear, zFar)
No-arg resets to the default perspective projection (60° vertical FOV). The 4-argument form sets an explicit symmetric perspective — fovy in radians, aspect = width/height.
Ortho
Ortho()Ortho(left, right, bottom, top)Ortho(left, right, bottom, top, near, far)
Orthographic (parallel) projection — objects stay the same size regardless of distance from the camera, useful for isometric-style views. No-arg uses the canvas bounds; the 4-argument form sets the X/Y clipping volume with default near/far planes; the 6-argument form sets everything explicitly.
Frustum
Frustum(left, right, bottom, top, near, far)
A general (possibly asymmetric) perspective projection from explicit clipping-plane coordinates — unlike Perspective(), the planes don't need to be centered on the view axis. near must be greater than zero, far greater than near. Processing gives frustum() no no-argument form, so neither does this.
BeginCamera · EndCamera
BeginCamera()EndCamera()
Places the camera with Translate()/RotateX/Y/Z()/Scale() — the same calls, composed the same way, you'd use to place any object — between these two. EndCamera() inverts the result into the actual view matrix once.
BeginCamera() continues from whatever camera state already exists rather than resetting it — start from a known placement with Camera() (or the 9-argument overload) right before, same idiom as real Processing.PrintCamera · PrintProjection
PrintCamera()PrintProjection()
Logs the current view or projection matrix to the console — a debugging aid for figuring out what a chain of camera calls actually produced.