# Draw a ParametricPlot3D space curve as an arrow?

GROUPS:
 I have a space curve created by ParametricPlot3D. Something like: plot = ParametricPlot3D[{Sin[u], Cos[u], u/(2*Pi)}, {u, 0, 2*Pi}, Axes -> None, ImageSize -> Medium]; To turn that into an arrow, I use: plotA = plot /. Line -> Arrow; and can then display that plotA properly as an arrow by Show or Print.But now I have to customize the arrow heads, e.g. use something like Arrowheads[Small] I can find no way to bring that into my plotA-arrow-curve. It seems that Arrowheads cannot be used as a Directive or Option for Show or the like. Instead it has to precede all Arrow graphics primitives. Probably I have to use a more intelligent form of the Replace-statement above. But I cannot find a legal form for replacing "Line" in plot by "Arrowheads[Small],Arrow" for plotA.In any case I think that Replace-method is some kind of brute force for drawing a parametric curve as an arrow. Are there better ways?
1 year ago
11 Replies
 Yehuda Ben-Shimol 3 Votes You just need to remember that graphics primitives are scoped within lists. In addition, operate you pattern matching on larger parts, rather then the Line head. Now that you know these two little details, you can modify it as you will. Look at the small modification I added below plotA = plot /. Line[x_] -> {Arrowheads[0.075], Red, Arrow[x]} bestyehuda
1 year ago
 Great, Yehuda. Thanks a lot.This works. Obviously I am still not experienced with pattern replacing.
1 year ago
 Sander Huisman 1 Vote You could also make a replica of ParametricPlot3D yourself: data = Table[{Sin[u], Cos[u], u/(2*Pi)}, {u, 0, 2 Pi, 0.01}]; Graphics3D[{Arrowheads[Small], Arrow[data]}] `
1 year ago
 Thanks Sander, I knew that. But this is not the same as a ParametricPlot. It is just a fixed sequence of Line/Arrow-Segments.
1 year ago
 It is nearly identical as what ParametricPlot outputs, there is not much magic going on... The main difference is the adaptive refinement...
1 year ago
 Ja, of course. But I feel to need that adaptive refinement.The background of my question is, that I have to draw 3D arcs for angles between vectors within large and complex graphics created from many objects and rotation transformations. Hence I do not really want to determine myself, how many segments would be reasonable for each and every angle-arc.Basically the problem is, that there is nothing like Circle with From/To-Angles for 3D. Hence this must be constructed manually with ParametricPlot3D.
1 year ago
 Sander Huisman 1 Vote There is:https://mathematica.stackexchange.com/questions/10957/an-efficient-circular-arc-primitive-for-graphics3dIt uses b-splines in a very efficient way, and uses far less points as ParametricPlot3D, moreover, it should be faster.
1 year ago
 Whow! Thanks.This looks great. But will cost me days for understanding the code. :-)