py3dframe.Frame.canonical#
- classmethod Frame.canonical(*, parent=None, convention=0)[source]#
Create the canonical frame of reference of \(\mathbb{R}^3\).
The canonical frame is defined by its origin at the zero vector and its basis vectors as the standard basis vectors.
- Parameters:
- Returns:
The canonical frame of reference of \(\mathbb{R}^3\).
- Return type:
Examples
Lets create the canonical frame.
from py3dframe import Frame canonical_frame = Frame.canonical()
The canonical frame is defined by its origin at the zero vector and its basis vectors as the standard basis vectors.
print("Origin of the canonical frame:", canonical_frame.origin) print("X-axis of the canonical frame:", canonical_frame.x_axis) print("Y-axis of the canonical frame:", canonical_frame.y_axis) print("Z-axis of the canonical frame:", canonical_frame.z_axis) # Output: # Origin of the canonical frame: [[0.] [0.] [0.]] # X-axis of the canonical frame: [[1.] [0.] [0.]] # Y-axis of the canonical frame: [[0.] [1.] [0.]] # Z-axis of the canonical frame: [[0.] [0.] [1.]]