Camera.window_center

Camera.window_center#

property Camera.window_center: tuple[float, float][source]#

Return or set the horizontal and vertical shift of the projection center.

The two values move the optical axis away from the center of the viewport, as fractions of its half-width and half-height. A calibrated principal point (cx, cy) of an image width by height pixels corresponds to a window center of (-2 * (cx - width / 2) / width, 2 * (cy - height / 2) / height).

Added in version 0.50.

Examples#

Download Python source code | Download Jupyter notebook

>>> import pyvista as pv
>>> camera = pv.Camera()
>>> camera.window_center
(0.0, 0.0)
>>> camera.window_center = (0.25, -0.1)
>>> camera.window_center
(0.25, -0.1)

See Also#

intrinsic_matrix