pyvista.Light.position#
- property Light.position[source]#
Return the position of the light.
Note: the position is defined in the coordinate space indicated by the light’s transformation matrix (if it exists). To get the light’s world space position, use the (read-only)
world_position
property.Examples
Create a light positioned at
(10, 10, 10)
after initialization, and note how the position is unaffected by a non-trivial transform matrix.>>> import numpy as np >>> import pyvista as pv >>> light = pv.Light() >>> light.position = (10, 10, 10) >>> # set a "random" transformation matrix >>> light.transform_matrix = np.arange(4 * 4).reshape(4, 4) >>> light.position (10.0, 10.0, 10.0)