XformDiagonal

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

Syntax

rhinoscriptsyntax.XformDiagonal (diagonal_value)

rhinoscript.transformation.XformDiagonal (diagonal_value)

Parameters

diagonal_value

Required.  number.  The diagonal value.

Returns

Transform

The 4x4 transformation matrix if successful.

None

If not successful, or on error.

Example

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))

Also See

XformIdentity

XformZero