| TUmatrixRot | TCL UTILITIES USER MANUAL | TUmatrixRot |
|---|
| set |
[TUmatrixInv  |
|
| Phi | - | The rotation axis rotation angle when returning rotation matrix about about a single rotation axis, otherwise the Euler rotation angle about the intial Z axis. | ||||||||||||
| Theta | - | The Eulerian rotation angle about the new X axis. | ||||||||||||
| Psi | - | The Eulerian rotation angle about the final Z axis. | ||||||||||||
| RotM | - | The returned rotation matrix. | ||||||||||||
| Fmt | - | Rotation matrix contents. All of
the defined formats can have _T appended to them to
return the tranpose of the defined rotation matrix as X
and X_T.
|
| NONE |
| X | X_T | ||||||||||||||||||
|
|
| Y | Y_T | ||||||||||||||||||
|
|
| Z | Z_T | ||||||||||||||||||
|
|
| EULER | |||||||||
|
| EULER_T | |||||||||
|
# GENERATE the XY coordinates of a rectangle
set R(0) -5.0 ; set R(1) -2.0 ; set R(2) 0.0
set R(3) -5.0 ; set R(4) 2.0 ; set R(5) 0.0
set R(6) 5.0 ; set R(7) 2.0 ; set R(8) 0.0
set R(9) 5.0 ; set R(10) -2.0 ; set R(11) 0.0
# PRODUCE forward rotation about Z and rotate data
TUmatrixRot 30.0 0.0 0.0 RoT Z
TUmatrixMath RoT * R Ra 3 3 3 1 0 0 0
TUmatrixMath RoT * R Ra 3 3 3 1 0 3 3
TUmatrixMath RoT * R Ra 3 3 3 1 0 6 6
TUmatrixMath RoT * R Ra 3 3 3 1 0 9 9
# PRODUCE reverse rotation about Z and rotate data
TUmatrixRot 30.0 0.0 0.0 RoT Z_T
TUmatrixMath RoT * R Rb 3 3 3 1 0 0 0
TUmatrixMath RoT * R Rb 3 3 3 1 0 3 3
TUmatrixMath RoT * R Rb 3 3 3 1 0 6 6
TUmatrixMath RoT * R Rb 3 3 3 1 0 9 9
# SET up graphics
GraphicsOn TK ETones
GenWindow 1 0.0 0.0 0.0 1.0 1.0 0.0 -8.0 -8.0 0.0 8.0 8.0 0.0
# ORIGINAL rectangle in white
PlotColor HOLD $GphInfo(White) OFF
Line 1 $R(0) $R(1) $R(2) $R(3) $R(4) $R(5)
Line 1 $R(3) $R(4) $R(5) $R(6) $R(7) $R(8)
Line 1 $R(6) $R(7) $R(8) $R(9) $R(10) $R(11)
Line 1 $R(9) $R(10) $R(11) $R(0) $R(1) $R(2)
# FORWARD rotated rectangle in red
PlotColor HOLD $GphInfo(Red) OFF
Line 1 $Ra(0) $Ra(1) $Ra(2) $Ra(3) $Ra(4) $Ra(5)
Line 1 $Ra(3) $Ra(4) $Ra(5) $Ra(6) $Ra(7) $Ra(8)
Line 1 $Ra(6) $Ra(7) $Ra(8) $Ra(9) $Ra(10) $Ra(11)
Line 1 $Ra(9) $Ra(10) $Ra(11) $Ra(0) $Ra(1) $Ra(2)
# REVERSE rotated rectangle in green
PlotColor HOLD $GphInfo(Green) OFF
Line 1 $Rb(0) $Rb(1) $Rb(2) $Rb(3) $Rb(4) $Rb(5)
Line 1 $Rb(3) $Rb(4) $Rb(5) $Rb(6) $Rb(7) $Rb(8)
Line 1 $Rb(6) $Rb(7) $Rb(8) $Rb(9) $Rb(10) $Rb(11)
Line 1 $Rb(9) $Rb(10) $Rb(11) $Rb(0) $Rb(1) $Rb(2)
# A few labels
TexT 1 0.0 7.00 0.0 center "ORIGINAL UNROTATED" $GphInfo(White)
TexT 1 0.0 6.25 0.0 center "FORWARD UNROTATED" $GphInfo(Red)
TexT 1 0.0 5.50 0.0 center "REVERSE UNROTATED" $GphInfo(Green)
update
| Sept 8, 2003 |
|---|