Scale a 3D Matrix¶
Scale a 3D Matrix¶
1# This example scales a 3D matrix by a 3D vector (10, 10, 10)
2# and prints the scaled matrix 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)
8matrix = three_d.matrix3_d()
9
10# Create a Scaling vector
11vector = three_d.vector3_d(10,10,10)
12
13# Scale the matrix by (10, 10, 10)
14matrix.scale(vector)
15
16# Create a local variable for the output toolbox
17ot = impact.gui.output_toolbox
18
19# Print the scaled matrix to output toolbox
20ot.add(matrix.to_string())
21