Search code examples
pythonvtkmayavimayavi.mlab

Mayavi curved arrow between two 3d points


Can I create a curved arrow in mayavi between two points?
This is a line I created using 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
And I would like it to be curved, i.e
enter image description here


Solution

  • There's no vtk PolyDataAlgorithm that's a bended arrow, although you could use visual.curve and add the tip with a 0-length arrow.