# Examples from pyvista.Transform.scale
# =====================================

# Compose a scale matrix.
import pyvista as pv
transform = pv.Transform().scale(1, 2, 3)
transform.matrix

# Compose a second scale matrix using `*`.
transform = transform * 2
transform.matrix

# Scale from a point. Check the `matrix_list` to see that a translation
# is added before and after the scaling.
transform = pv.Transform().scale(7, point=(1, 2, 3))
translation_to_origin = transform.matrix_list[0]
translation_to_origin

scale = transform.matrix_list[1]
scale

translation_from_origin = transform.matrix_list[2]
translation_from_origin

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

