Next / Previous / Contents / Shipman's homepage

8.7. Xform.compose(): Compose two transforms

To compose a transform T1 followed by transform T2, the new transform matrix is their dot product, with the second transform on the left side of the first.

homcoord.py
# - - -   X f o r m . c o m p o s e

    def compose ( self, t2 ):
        '''Return the composition of two transforms.
        '''
        return Xform ( num.dot ( t2.__m, self.__m ) )