1
$\begingroup$

I'm very new to mathematica, so pardon me for such a simple question. I have tried to follow the syntax of the "Arrow" documentation(https://reference.wolfram.com/language/ref/Arrow.html), but I cannot seem to add arrows to this Parametric Plot. I have no issue plotting a point to the plot (the red dot), but the arrows will not add. Can you spot the problem? Thank you for your time.

x = {4*Cos[s/5], 4*Sin[s/5], 3*s/5}  
pointOfInterest = {0, 4, 3*Pi/2};  
tangentv = pointOfInterest + {-4/5, 0, 3/5};  
normalv = pointOfInterest + {0, -1, 0};  
binormalv = pointOfInterest + {3/5, 0, 4/5};  
Show[  
 (*Sorting the curve itself and orientation.*)  
 ParametricPlot3D[{{x}},  
   {s, 0, 10}] /.   
  Line[x_] :> {Arrowheads[Table[.05, {5}]], Arrow[x]},  
 (*Adding the point, and corresponding vectors.*)  
 Graphics3D[{Red, PointSize[0.04], Point[{pointOfInterest}]}],  
 Graphics3D[{Arrow[Line[{{pointOfInterest}, {tangentv}}]]}],  
 Graphics3D[{Arrow[Line[{{pointOfInterest}, {normalv}}]]}],  
 Graphics3D[{Arrow[Line[{{pointOfInterest}, {binormalv}}]]}]] 

Thanks very much for your help.

$\endgroup$
1
$\begingroup$

Remove the braces around pointOfInterest, tangentv, normalv and binormalv,that is, use Graphics3D[{Arrow[Line[{pointOfInterest, tangentv}]]}] instead of Graphics3D[{Arrow[Line[{{pointOfInterest}, {tangentv}}]]}], similarly for other arrows to get:

enter image description here

A more compact way to get the same result is:

Show[ParametricPlot3D[{{x}}, {s, 0, 10}, PlotStyle -> Arrowheads[Table[.05, {5}]]] /. 
   Line -> Arrow, 
 Graphics3D[{{Red, PointSize[0.04], Point[{pointOfInterest}]}, 
   Black, Arrow[{pointOfInterest, #} & /@ {tangentv, normalv, binormalv}]}]]

same picture

$\endgroup$
  • $\begingroup$ Thanks very much, your way is much clearer! $\endgroup$ – Michael Mitchell Feb 17 at 16:07
  • $\begingroup$ @MichaelMitchell, my pleasure. Thank you for the accept. And welcome to mma.se. $\endgroup$ – kglr Feb 17 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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