vtkCAMERA Procedure

Changes the camera’s parameters.

Usage

vtkCAMERA

Input Parameters

None.

Keywords

Name—Specify a name to be used to create this object. If an undefined variable is used or no name is specified, then a random name is used. This name can be used in calls to vtkCOMMAND to modify this object.

Position—An array of three floating point numbers describing the x, y, and z position for the camera in data coordinates.

FocalPoint—An array of three floating point numbers describing the x, y, and z position for the camera’s focal point in data coordinates.

ClippingRange—An array of two floating point numbers describing the distance from the camera to the front and back clipping planes (in data coordinates).

ViewUp—An array of three floating point numbers describing a vector that represents the up direction for the view.

Distance—A floating point number describing the distance from the focal point to the camera (which will modify the FocalPoint value) in data coordinates.

ViewAngle—A floating point number that sets the view angle of the camera in degrees.

Azimuth—A scalar value describing the angle in degrees to rotate the camera about the view up vector centered at the focal point. This moves the camera from side to side.

Elevation—A scalar value describing the angle in degrees to rotate the camera about the cross product of the direction of projection and the view up vector centered on the focal point. This moves the camera up and down.

Roll—A scalar value describing the angle in degrees to rotate the camera about the direction of projection. This rolls the camera about the direction of projection.

Discussion

A default camera is created for each vtkWINDOW with these properties: position and focal point such that all objects are visible, with the camera centered on the entire scene; view up along the Y axis; view angle set to 30 degrees; and a clipping range set to 0.1, 1000.0.

Note:

vtkSURFACE, vtkSCATTER and vtkPOLYSHADE change this default and set the up vector to be along the z axis.

Example

pyramid_list = [[0,0,0],[0,1,0],[1,0,0],[1,1,0],[.5,.5,1]]
vertex_list=[3,0,2,4,3,2,3,4,3,3,1,4,3,1,0,4,4,0,1,3,2]
vtkPolyshade, pyramid_list, vertex_list
vtkCamera, Azimuth=25, Elevation=45, ViewAngle=120