Transformation Matrix Help


#1

Can someone please tell me whats wrong with this mel command


  {
  matrix $test[4][4] = 
  <<
  0.73373, 	0, 		-0.679441, 	0; 
  -0.528025, 	0.62932,	-0.570215, 	0; 
  0.427586,	0.777146, 	0.461751, 	0; 
  5.298673, 	10.155224, 	5.738297, 	1 
  >>;
  
  xform -m $test spotLight1;
  }
 

thanks in advance


#2

Ah forget it I got the result

{
matrix $test[4][4] = 
<<
0.73373, 	0, 		-0.679441, 	0; 
-0.528025, 	0.62932,	-0.570215, 	0; 
0.427586,	0.777146, 	0.461751, 	0; 
5.298673, 	10.155224, 	5.738297, 	1 
>>;

xform -ws -m 
($test[0][0]) ($test[0][1]) ($test[0][2]) ($test[0][3]) 
				 
($test[1][0]) ($test[1][1]) ($test[1][2]) ($test[1][3]) 
				 
($test[2][0]) ($test[2][1]) ($test[2][2]) ($test[2][3]) 
				 
($test[3][0]) ($test[3][1]) ($test[3][2]) ($test[3][3]) 


spotLight1 ;
}

#3

I have stumbled upon another problem,
How do I know what is the rotation and translation part in the matrix?


#4

The first twelve numbers create the co-ordinate space.
The last four numbers represent the location where the base of the co-ordinate space is placed.

-jj

#5

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.