Message Boards Message Boards

ArrowHead not at the end of a tube? (Mathematica V11.3)

Posted 7 years ago

With the 11.3 version the combination Arrow Tube give unexpected results : the arrow head is not positionned at the end of the tube as expected from documentation : http://reference.wolfram.com/language/ref/Arrow.html 3rd example of the basics

Code example :

Graphics3D[{Red, Arrowheads[0.1], 
  Arrow[Tube[{{1, 1, -1}, {2, 2, 0}, {3, 3, -1}, {4, 4, 0}}, 0.05]]}]
Attachments:
4 Replies

Another solution is to create your own arrowhead (kinda annoying, no idea why they changed it...):

 h = Graphics3D[{EdgeForm[Blue], Rotate[Cone[], 90 \[Degree], {0, 1, 0}]}];
    Graphics3D[{Blue, Arrowheads[{{0.1, 1, {h, 1}}}], 
      Arrow[Tube[{{0, 0, 0}, {1, 1, 1}}, 0.05]]}]

The third parameter in Arrowheads[{0.1,1,{h,1}}] specifies a non-default arrowhead type and its' location (in between 0 and 1). The result looks like this (the arrow head is sharp again): enter image description here

The line:

Rotate[Cone[], 90 \[Degree], {0, 1, 0}]}]

is needed to fix the cone orientation, otherwise it points to a wrong direction. I guess this manual arrowhead adds more functionality but I don't think people often use non-default arrowheads. Another annoying thing is that when you turn on transparency you will see the tube inside the cone

h = Graphics3D[{EdgeForm[Blue], 
    Rotate[Cone[], 90 \[Degree], {0, 1, 0}]}];
Graphics3D[{Blue, Opacity[0.5], Arrowheads[{{0.1, 1, {h, 1}}}], 
  Arrow[Tube[{{0, 0, 0}, {1, 1, 1}}, 0.05]]}]

enter image description here

Well... I have no idea why did they change it from the previous version.

POSTED BY: Dima Panna

Very curious. Inserting an intermediate point along the tube shaft in certain positions makes the problem go away:

Manipulate[
 Graphics3D[{Red, Arrowheads[.2], 
   Arrow[Tube[{{3, 3, -1}, (1 - t) {3, 3, -1} + t {4, 4, 0}, {4, 4, 
       0}}, 0.05]]}],
 {t, 0, 1}]
POSTED BY: Gianluca Gorni
Posted 7 years ago

I see the same, Windows 10. Another example can be found in WL documentation http://reference.wolfram.com/language/ref/Tube.html?q=Tube. 3rd example under Applications.

In 11.3:

enter image description here

In 11.2 its OK. :

enter image description here

POSTED BY: Hans Milton
Posted 5 years ago

The bug is fixed in version 12.0.0:

enter image description here

POSTED BY: Alexey Popkov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract