python - 两个 3d 点之间的 Mayavi 弯曲箭头

标签 python vtk mayavi mayavi.mlab

我可以在 Mayavi 中在两点之间创建弯曲箭头吗?
这是我使用 vtk 创建的一行

ar1 = visual.arrow(x=x1, y=y1, z=z1)
arrow_length = np.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2 + (z2 - z1) ** 2)
ar1.actor.scale = [arrow_length, arrow_length, arrow_length]
ar1.pos = ar1.pos / arrow_length
ar1.axis = [x2 - x1, y2 - y1, z2 - z1]

enter image description here
我希望它是弯曲的,即
enter image description here

最佳答案

没有 vtk PolyDataAlgorithm 是弯曲的箭头,尽管您可以使用 visual.curve 并添加带有 0 长度箭头的尖端。

关于python - 两个 3d 点之间的 Mayavi 弯曲箭头,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57601857/

相关文章:

python - 如何插入颜色或三角化表面

python - 在mlab/mayavi/python中设置平行前瞻

c++ - 将速度场可视化为定向箭头

python - 从剖切面提取数据

c++ - CMake ExternalProject_Add() 和 FindPackage()

python - 防止轴在相机移动时更新 - mayavi python

Python - 有人能告诉我这两行的作用吗?

python - 错误 :document must be an instance of dict, bson.son.SON、bson.raw_bson.RawBSONDocument 或继承自 collections.MutableMapping 的类型

python - 如何将 pdf 从 Django HTTP 对象上传到 Google Drive

python - 在 Cython 的 cdef 语句中使用 scipy.integrate.quad?