Returns a diagonal transformation matrix. Diagonal matrices are 3x3 with the bottom row = 0,0,0,1.
d |
0 |
0 |
0 |
0 |
d |
0 |
0 |
0 |
0 |
d |
0 |
0 |
0 |
0 |
1 |
rhinoscriptsyntax.XformDiagonal (diagonal_value)
rhinoscript.transformation.XformDiagonal (diagonal_value)
diagonal_value |
Required. number. The diagonal value. |
Transform |
The 4x4 transformation matrix if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
def printmatrix(xform):
for i in range(4):
print "[", xform[i,0], ", ", xform[i,1], ", ", xform[i,2], ", ", xform[i,3], "]"
printmatrix(rs.XformDiagonal(3))