Rotation of 3D vector?(3D矢量的旋转?)
问题描述
我有两个向量作为 Python 列表和一个角度.例如:
I have two vectors as Python lists and an angle. E.g.:
v = [3,5,0]
axis = [4,4,1]
theta = 1.2 #radian
当围绕轴旋转 v 向量时,获得结果向量的最佳/最简单方法是什么?
What is the best/easiest way to get the resulting vector when rotating the v vector around the axis?
对于轴矢量指向的观察者来说,旋转应该是逆时针的.这称为右手法则
The rotation should appear to be counter clockwise for an observer to whom the axis vector is pointing. This is called the right hand rule
推荐答案
看看http://vpython.org/contents/docs/visual/VisualIntro.html.
它提供了一个 vector
类,该类具有 A.rotate(theta,B)
方法.如果您不想在 A
上调用该方法,它还提供了一个辅助函数 rotate(A,theta,B)
.
It provides a vector
class which has a method A.rotate(theta,B)
. It also provides a helper function rotate(A,theta,B)
if you don't want to call the method on A
.
http://vpython.org/contents/docs/visual/vector.html
这篇关于3D矢量的旋转?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:3D矢量的旋转?


基础教程推荐
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 筛选NumPy数组 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01