Multiply a 3D matrix¶
Multiply a 3D matrix¶
1# This example multiplies two 3D matrices
2# and prints the result to output screen
3
4# Create a local variable for the impact.creator ThreeD object
5three_d = impact.creator.three_d()
6
7# Create a default 3D matrix (Identity matrix)
8matrix1 = three_d.matrix3_d()
9
10# Create another default 3D matrix (Identity matrix)
11matrix2 = three_d.matrix3_d()
12
13# Multiply with existing matrix
14call(matrix1.multiply(matrix2))
15
16# Create a local variable for the output toolbox
17ot = impact.gui.output_toolbox
18
19# Print the matrix to output toolbox
20ot.add(matrix1.to_string())