使用matplotlib,python绘制三个正交矢量和大小的椭圆形
我有三个正顺序向量
(-0.460021, -0.241295, -0.854493),
(-0.641846, 0.755344, 0.132244),
(-0.613526, -0.609288, 0.502348)
,并且沿着这些方向的每个方向1.44、3.45
和2.02
沿每个方向的亮度值。
我如何绘制代表沿正顺序向量的轴方向以及其大小给出的轴长的椭圆形(3D表面)?
I have three orthonormal vectors
(-0.460021, -0.241295, -0.854493),
(-0.641846, 0.755344, 0.132244),
(-0.613526, -0.609288, 0.502348)
and a magntitude value along each of these direction 1.44, 3.45
and 2.02
.
How can I plot an ellipsoid (3D surface) representing the axis directions along the orthonormal vectors and the axis lengths given by their magnitude ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我正确理解您的问题,您想创建一个椭圆形并旋转它,以使其主要轴与正统向量对齐。
注释:由于Matplotlib的3D功能相当有限,因此我将使用绘图:这将使我们的生活变得容易得多,因为它为3D图提供了“相等”的长宽比。您可以轻松地将绘图库更改为matplotlib。
椭圆形的参数方程可以在这里找到。
If I understand your question correctly, you want to create an ellipsoid and rotate it so that its major axis are aligned with the orthonormal vectors.
Note: since Matplotlib's 3D capability are rather limited, I'm going to use Plotly: it will make our life a lot easier since it provides an "equal" aspect ratio for 3D plots. You can easily change the plotting library to Matplotlib.
The parametric equations for an ellipsoid can be found here.