Differences between revisions 2 and 3
Revision 2 as of 2008-09-05 20:31:15
Size: 1754
Comment:
Revision 3 as of 2008-09-05 20:31:43
Size: 1764
Comment:
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
We use the [http://blake.bcm.edu/eman2/doxygen_html/classEMAN_1_1Transform.html Transform] class for storing/managing Euler angles,translations, scales and x mirroring. At any time a Transform ({{{$$X$$}}}) object defines a group of 4 transformations of a rigid body that are applied in a specific order, namely We use the [http://blake.bcm.edu/eman2/doxygen_html/classEMAN_1_1Transform.html Transform] class for storing/managing Euler angles,translations, scales and x mirroring. At any time a Transform object defines a group of 4 transformations of a rigid body that are applied in a specific order, namely
Line 7: Line 7:
{{{$$X \equiv M T S R $$}}} {{{$$Transform \equiv M T S R $$}}}
Line 11: Line 11:
{{{$$ X = [[sMR,M\mathbf{t}],[\mathbf{0}^T,1]]$$}}} {{{$$ Transform = [[sMR,M\mathbf{t}],[\mathbf{0}^T,1]]$$}}}
Line 15: Line 15:
{{{$$ X \mathbf{p}_{hc} = ( (sMR\mathbf{p} + M\mathbf{t})^T, 1 )^T $$}}} {{{$$ Transform \mathbf{p}_{hc} = ( (sMR\mathbf{p} + M\mathbf{t})^T, 1 )^T $$}}}

TableOfContents

What is a Transform?

We use the [http://blake.bcm.edu/eman2/doxygen_html/classEMAN_1_1Transform.html Transform] class for storing/managing Euler angles,translations, scales and x mirroring. At any time a Transform object defines a group of 4 transformations of a rigid body that are applied in a specific order, namely

$$Transform \equiv M T S R $$

Where $$M  is a mirroring operation about the x-axis, $$T}  is a translation, $$S$$ is a uniform, positive, non zero scaling operation and $$R$$ is a rotation. The Transformobject stores these transformations internally in a 4x4 matrix, as is commonly the case in computer graphics applications that use homogeneous coordinate systems (i.e. OpenGL). In these approaches the 4x4 transformation matrix $$X$$ is constructed in this way

$$ Transform = [[sMR,M\mathbf{t}],[\mathbf{0}^T,1]]$$

Where $$s$$ is the constant scaling factor, $$M$$ is the option x-mirroring operation which identity, except in the case of x mirroring where the (0,0) entry is -1, $$R$$ is a $$3x3$$ rotation matrix and $$\mathbf{t}=(dx,dy,dz)^T$$ is a post translation. In this approach a 3D point $$\mathbf{p}=(x,y,z)^T$$ as represented in homogeneous coordinates as a 4D vector $$\mathbf{p}_{hc}=(x,y,z,1)^T$$ and is multiplied by the matrix $$M$$ to produce the result of applying the transformation

$$ Transform \mathbf{p}_{hc} = ( (sMR\mathbf{p} +  M\mathbf{t})^T, 1 )^T $$

In this way the result of applying a Transform is a rotation followed by scaling operation, followed by a translation and then finally the x mirroring operation is (optionally) applied.

Constructing a Transform

EMAN2/TransformInPython (last edited 2023-09-29 12:51:26 by SteveLudtke)