Visualization in 3D I. Renderers When working with 3D, in your setup() you'll need to tell Processing to use a 3D capable renderer. We specify this in the size() command. The default is 2D but there are a few options: size(1024, 768); <--- since P2D is the default renderer we don't even need to type it. size(1024, 768, P2D); <--- but we can type it if we want. size(1024, 768, P3D); <--- this is 3D capable size(1024, 768, OPENGL); <--- also remember to import the library: "import processing.opengl.*;" I found this nice explanation of renderers: At the moment Processing has four different renderers: JAVA2D, P2D, P3D and OPENGL. The advantage of different renderers is that each has it’s strengths and weaknesses. So it’s sensible to determine which renderer will work best for your situation. The first obvious difference is 2D versus 3D. JAVA2D is basically the best quality. P2D is the fastest for pixel manipulations. P3D is useful for basic 3D sketches. OPENGL is best for more elaborate 3D sketches. Choose the one that works best for your specific sketch. From Processing 2.0 onwards there will be only 2 renderers: JAVA2D and OPENGL. The main reason is that the developers want to focus their energy on two renderers (one for 2D, one for 3D) instead of having to divide their attention over four. In the short term there is some cost (the loss of the speedy P2D, some libraries will break until updated to work with 2.0). However in the long run there are greater benefits (higher quality renderers for both 2D and especially 3D). So basically, when working with 3D, either specify P3D or OPENGL. One of them will generally be faster depending on your computer or the commands you call in your sketch. In practice I find that OPENGL is faster (better) for most situations. This same page also had many Processing tips that I found quite useful: http://amnonp5.wordpress.com/2012/01/28/25-life-saving-tips-for-processing/ For example, "Checking if the mouse is over a circle or rect" II. Camera manipulation First, we need to install Peasycam library. You can download the library file here: http://mrfeinberg.com/peasycam/ Installation Unzip and put the extracted peasycam folder into the libraries folder of your processing sketches. Reference and examples are included in the peasycam folder. We don't have to use PeasyCam to manipulate the camera position in Processing, however it makes things much easier. If you want to know how to do it from scratch, look in the 3D--> Camera folder of the Processing examples. PeasyCam gives us a layer of abstraction which allows us to set camera positions in a much more intuitive way. It also sets up a default set of camera mouse controls, which is nice. The documentation is relatively straight forward: Constructors PeasyCam(PApplet parent, double lookAtX, double lookAtY, double lookAtZ, double distance); PeasyCam(PApplet parent, double distance); // look at 0,0,0 Methods camera.setActive(boolean active); // false to make this camera stop responding to mouse // By default, the camera is in "free rotation" mode, but you can // constrain it to any axis, around the look-at point: camera.setYawRotationMode(); // like spinning a globe camera.setPitchRotationMode(); // like a somersault camera.setRollRotationMode(); // like a radio knob camera.setSuppressRollRotationMode(); // Permit pitch/yaw only. // Then you can set it back to its default mode: camera.setFreeRotationMode(); // reassign particular drag gestures, or set them to null camera.setLeftDragHandler(PeasyDragHandler handler); camera.setCenterDragHandler(PeasyDragHandler handler); camera.setRightDragHandler(PeasyDragHandler handler); PeasyDragHandler getPanDragHandler(); PeasyDragHandler getRotateDragHandler(); PeasyDragHandler getZoomDragHandler(); // mouse wheel zooms by default; set null, or make your own camera.setWheelHandler(PeasyWheelHandler handler); PeasyWheelHandler getZoomWheelHandler(); // change sensitivity of built-in mouse wheel zoom camera.setWheelScale(double scale); // 1.0 by default double getWheelScale(); // make your own! public interface PeasyDragHandler { public void handleDrag(final double dx, final double dy); } public interface PeasyWheelHandler { public void handleWheel(final int delta); } camera.setResetOnDoubleClick(boolean resetOnDoubleClick); // default true camera.lookAt(double x, double y, double z); camera.lookAt(double x, double y, double z, long animationTimeInMillis); camera.lookAt(double x, double y, double z, double distance); camera.lookAt(double x, double y, double z, double distance, long animationTimeInMillis); camera.rotateX(double angle); // rotate around the x-axis passing through the subject camera.rotateY(double angle); // rotate around the y-axis passing through the subject camera.rotateZ(double angle); // rotate around the z-axis passing through the subject camera.setDistance(double d); // distance from looked-at point camera.pan(double dx, double dy); // move the looked-at point relative to current orientation double camera.getDistance(); // current distance float[] camera.getLookAt(); // float[] { x, y, z }, looked-at point camera.setMinimumDistance(double minimumDistance); camera.setMaximumDistance(double maximumDistance); // clamp zooming camera.reset(); camera.reset(long animationTimeInMillis); // reset camera to its starting settings CameraState state = camera.getState(); // get a serializable settings object for current state camera.setState(CameraState state); camera.setState(CameraState state, long animationTimeInMillis); // set the camera to the given saved state float[] rotations = camera.getRotations(); // x, y, and z rotations required to face camera in model space camera.setRotations(double pitch, double yaw, double roll); // rotations are applied in that order float[] position = camera.getPosition(); // x, y, and z coordinates of camera in model space // Utility methods to permit the use of a Heads-Up Display // Thanks, A.W. Martin camera.beginHUD(); // now draw things that you want relative to the camera's position and orientation camera.endHUD(); // always! Hint() : http://js.processing.org/reference/hint_ hint(ENABLE_OPENGL_4X_SMOOTH) - Enable 4x anti-aliasing for OpenGL. This can help force anti-aliasing if it has not been enabled by the user. On some graphics cards, this can also be set by the graphics driver's control panel, however not all cards make this available. This hint must be called immediately after the size() command because it resets the renderer, obliterating any settings and anything drawn (and like size(), re-running the code that came before it again). hint(DISABLE_OPENGL_2X_SMOOTH) - In Processing 1.0, Processing always enables 2x smoothing when the OpenGL renderer is used. This hint disables the default 2x smoothing and returns the smoothing behavior found in earlier releases, where smooth() and noSmooth() could be used to enable and disable smoothing, though the quality was inferior. Here are instructions and an example of how to render large amounts of text in Processing in 3D without slowing down. http://blog.blprnt.com/blog/blprnt/processing-tip-rendering-large-amounts-of-text-fast There are also more efficient ways to render large amounts of 3D shapes (so that your framerate doesn't suffer). The solution is to use something called a "Vertex Buffer Object" (VBO). To do this in Processing I recommend using this library, which fortunately comes with many examples: http://glgraphics.sourceforge.net/