py3dframe.Frame.axes#

property Frame.axes: ndarray#

The basis vectors of the frame relative to the parent frame.

The axes is a 3x3 matrix with shape (3, 3) representing the basis vectors of the frame in the parent frame coordinates. The first column is the x-axis, the second column is the y-axis and the third column is the z-axis.

Note

This property is settable.

See also

  • attribute parent to get or set the parent frame.

  • attribute x_axis to access the x-axis of the frame.

  • attribute y_axis to access the y-axis of the frame.

  • attribute z_axis to access the z-axis of the frame.

  • attribute global_axes to access the basis vectors of the frame in the global frame coordinates.

Parameters:

axes (numpy.ndarray) – The basis vectors of the frame in the parent frame coordinates as an array-like with shape (3, 3).

Returns:

The basis vectors of the frame in the parent frame coordinates with shape (3, 3).

Return type:

numpy.ndarray

Examples

Lets define the axes of a frame.

import numpy from py3dframe import Frame

frame = Frame.canonical()

# Define the axes of the frame (Axes will be normalized) x_axis = numpy.array([1, 0, 0]) y_axis = numpy.array([0, 2, 0]) z_axis = numpy.array([0, 0, 3])

axes = numpy.column_stack((x_axis, y_axis, z_axis)) frame.axes = axes print(“Axes of the frame:”, frame.axes) # Output: Axes of the frame: [[1. 0. 0.] # [0. 1. 0.] # [0. 0. 1.]]