def generate_transformation_matrix(self, reference_frame, point):
        """Generates a symbolic transformation matrix, with respect to the
        provided reference frame and point.

        Parameters
        ==========
        reference_frame : ReferenceFrame
            A reference_frame with respect to which transformation matrix is
            generated.
        point : Point
            A point with respect to which transformation matrix is
            generated.

        Returns
        =======
        A 4 x 4 SymPy matrix, containing symbolic expressions describing the
        transformation as a function of time.

        """
        rotation_matrix = self.reference_frame.dcm(reference_frame)
        self._transform = Identity(4).as_mutable()
        self._transform[:3, :3] = rotation_matrix

        point_vector = self.origin.pos_from(point)
        try:
            self._transform[3, :3] = point_vector.to_matrix(reference_frame).T
        except __HOLE__:
            # In earlier versions of sympy, 'Vector' object has no attribute
            # 'to_matrix'.
            self._transform[3, 0] = point_vector.dot(reference_frame.x)
            self._transform[3, 1] = point_vector.dot(reference_frame.y)
            self._transform[3, 2] = point_vector.dot(reference_frame.z)
        return self._transform
dataset/ETHPy150Open pydy/pydy/pydy/viz/visualization_frame.py/VisualizationFrame.generate_transformation_matrix