2 Replies Latest reply on May 11, 2007 11:05 AM by ElPeque2

# How do i create a custom transform?

transforms are actually 4x4 matrixes, right?

after doing some scaling, rotating and translating to a transform, if you print (put) one to the message window, you get something like:

-- transform(7.00000,0.00000,0.00000,0.00000, 0.00000,8.00000,0.00000,0.00000,
0.00000,0.00000,9.00000,0.00000,
4.00000,5.00000,6.00000,1.00000)

which is the 4x4 matrix for such transform.

my question is...

is there any way to create a transform PROVIDING THE MATRIX ITSELF?

for example, can i create a transform, which's matrix is deliberately

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16?

that would help me a lot for optimization purposes.

thanks :)
• ###### 1. Re: How do i create a custom transform?
You can make a new transform by using transform(). Then you can set the
individual parts of the transform using bracket notation (like lists)

tTransform = transform()
put tTransform

-- transform(1.00000,0.00000,0.00000,0.00000,
0.00000,1.00000,0.00000,0.00000, 0.00000,0.00000,1.00000,0.00000,
0.00000,0.00000,0.00000,1.00000)

put tTransform[1]

-- 1.000

tTransform[2]=2
put tTransform

-- transform(1.00000,2.00000,0.00000,0.00000,
0.00000,1.00000,0.00000,0.00000, 0.00000,0.00000,1.00000,0.00000,
0.00000,0.00000,0.00000,1.00000)
• ###### 2. Re: How do i create a custom transform?
wohaaaa! :P

great, thanks :P