# Examples from pyvista.Light.world_position
# ==========================================

# Create a light with a transformation matrix that corresponds to a
# 90-degree rotation around the z-axis and a shift by (0, 0, -1), and
# check that the light's position transforms as expected.
import numpy as np
import pyvista as pv
light = pv.Light(position=(1, 0, 3))
trans = np.zeros((4, 4))
trans[:-1, :-1] = [[0, -1, 0], [1, 0, 0], [0, 0, 1]]
trans[:-1, -1] = [0, 0, -1]
light.transform_matrix = trans
light.position
light.world_position

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

