18
$\begingroup$

I'd like to create what might be called "ribbon arrows" in a Graphics3D, as shown in this figure:

enter image description here

The center of curvature must be on a specified point (typically on an axis), and the plane of the rotation, starting angle position and the total angle traversed (e.g., 90 degrees, 180 degrees, 270 degrees, ...) must be specifiable.

I can make such using Arrows in 3D, but that gives me a line or a tube, not the nice "ribbon" in the figure, and the arrowhead is all wrong. I can also make a section of a Cylinder, but then adding the arrowhead (which must also curve) proves to be awkward and rather difficult.


Solution example

Here's my Graphics3D figure based on @DanielHuber's approach

RollPitchYaw

$\endgroup$
2
  • $\begingroup$ Such arrows, as one encounters, tend to look parabolic to me, but I think it's because the axis does not go through the center but roughly through the center of mass of the convex hull $\approx$ semi-disk. They also look like plane figures that come from coloring in the outline suggested by two offset semicircles. That is what I see, but I don't think that is what you want reproduced. Am I right? $\endgroup$
    – Michael E2
    Dec 2, 2021 at 19:38
  • $\begingroup$ @MichaelE2: You are correct. My figure (lifted from the web) isn't quite right... the arrows were likely hand drawn and hence not perfect. I need accurate sections of circles, which WILL look correct in my Graphics3D, particularly as I rotate the entire figure dynamically. $\endgroup$ Dec 2, 2021 at 19:40

2 Answers 2

20
$\begingroup$

You can use "Tube" and "Scale" to get ribbon like arrows:

pos1 = {0, 0, 0};
pos2 = {0, 0, 0.5};
Graphics3D[{Arrowheads[0.02], Red,
  Scale[Arrow[
    Tube[Table[
      pos1 + {Sin[ph], Cos[ph], 0}, {ph, 0, Pi/2, Pi/32}]]], {1, 1, 
    10}],
  Green,
  , Scale[
   Arrow[Tube[
     Table[pos2 + {Sin[ph], Cos[ph], 0}, {ph, 1/2 Pi, 3/2 Pi, 
       Pi/32}]]], {1, 1, 10}]
  }, PlotRange -> {{-1, 1}, {-1, 1}, {-0.2, 1}}, Axes -> True]

enter image description here

$\endgroup$
2
  • $\begingroup$ Yep... that will do. Thanks. ($\checkmark$). Changing the overall orientation to an arbitrary direction takes a bit of work, but I'm sure I can figure that out. $\endgroup$ Dec 2, 2021 at 19:47
  • $\begingroup$ This solution might run into issues with the projection of the arrowhead, but the one by B flat would not. (Per my understanding.) $\endgroup$ Dec 4, 2021 at 0:52
13
$\begingroup$

Here's another option.

b = ParametricPlot3D[{Cos[u], Sin[u], 2 v}, {u, Pi/4, 
    7 Pi/4}, {v, -1/8, 1/8}, PlotRange -> 2, Mesh -> None];
a = ParametricPlot3D[{Cos[u], Sin[u], 2 v}, {u, 0, Pi/4}, {v, -1/4 u, 
    1/4 u}, PlotRange -> 2, Mesh -> None];
Show[a, b]

enter image description here

Also, just switch the orders in the components to change the rotational axis for each. You can also move the figure to any point. For example, the code below generates the same figure above but is now rotated about the x-axis (instead of z). It also moves the figure to the point {2,3,5}. Choose your rotational axis and point as you wish. Just make sure the plotrange stay large enough to include everything.

b = ParametricPlot3D[{2, 3, 5} + {2 v, Sin[u], Cos[u]}, {u, Pi/4, 
    7 Pi/4}, {v, -1/8, 1/8}, PlotRange -> 6, Mesh -> None];
a = ParametricPlot3D[{2, 3, 5} + {2 v, Sin[u], Cos[u]}, {u, 0, 
    Pi/4}, {v, -1/4 u, 1/4 u}, PlotRange -> 6, Mesh -> None];
Show[a, b]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.