next up previous contents index
Next: Clipping and Cropping Up: The Camera Previous: The Lens   Contents   Index

Manipulating the Camera

The camera is a C++ class, manipulated by member functions. The begin() command initializes the camera, so all changes of camera must occur in the body of the figure. By default, the viewpoint is at large distance on the positive $ x_3$-axis, looking down on the $ (x_1,x_2)$-plane. This provides the expected behavior for 2-dimensional figures.

The viewpoint and target may be set individually. In general, either operation changes the direction of the eye vector, which forces ePiX to re-determine the sky vector. When possible, the $ x_3$-axis projects parallel to the sky; otherwise the $ x_2$-axis is used. The viewpoint and target can be moved along the eye axis, changing the range while preserving the orientation: range() fixes the target, and focus() fixes the viewpoint. Each command re-sizes the image; note that increasing the focus enlarges the image.

The camera may be rotated about any of its axes. Axes of rotation pass through the target, so rotations about the sea or sky vectors change the viewpoint. For best control of the camera, set the target first, then the viewpoint. If desired, perform eye rotations last.


next up previous contents index
Next: Clipping and Cropping Up: The Camera Previous: The Lens   Contents   Index
Andrew D. Hwang 2004-09-04