def rotation_from_axes(x_axis, y_axis, z_axis):
"""Convert specification of axis in target frame to
a rotation matrix from source to target frame.
Parameters
----------
x_axis : :obj:`numpy.ndarray` of float
A normalized 3-vector for the target frame's x-axis.
y_axis : :obj:`numpy.ndarray` of float
A normalized 3-vector for the target frame's y-axis.
z_axis : :obj:`numpy.ndarray` of float
A normalized 3-vector for the target frame's z-axis.
Returns
-------
:obj:`numpy.ndarray` of float
A 3x3 rotation matrix that transforms from a source frame to the
given target frame.
"""
return np.hstack((x_axis[:,np.newaxis], y_axis[:,np.newaxis], z_axis[:,np.newaxis]))
rigid_transformations.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录