map_model_to_world#

Graphic.map_model_to_world(position)[source]#

map position from model (data) space to world space, basically applies the world affine transform

Parameters:

position (tuple[float, float, float] | np.ndarray) – The xyz positions we wish to map to world space, an (x, y, z) tuple or an array of shape (num_points, 3)

Returns:

either shape (3,) or (num_points, 3), specifying position in world space

Return type:

np.ndarray

Examples#

Rotate image

Rotate image

Rotate line

Rotate line

Scale image

Scale image

Scale line

Scale line

Translate image

Translate image

Translate line

Translate line

Translate and scale image

Translate and scale image

Translate and scale line

Translate and scale line

Translate scale and rotate image

Translate scale and rotate image

Translate scale and rotate line

Translate scale and rotate line