3
$\begingroup$

I'd like to draw a sinusoidal tube with an arrowhead. The piece that is connected to the arrowhead must be a straight tube, but the rest must be sinusoidal tube (for example, from $0$ to $6\pi$ a sinusoidal tube and from $6\pi$ to $7$ a straight tube + arrowhead). I have no idea how to modify the following code to include a sinusoidal part.

Graphics3D[{Red, Arrowheads[0.1], 
Arrow[Tube[{{0, 0, 0}, {4, 0, 0}}, 0.09]]}, Boxed -> False]
$\endgroup$
5
$\begingroup$

Are you looking for something like this?

Show[
 ParametricPlot3D[{x, 0, Sin[x]}, {x, 0, 6 Pi}] /. 
  Line[x_] :> {Red, Tube[x, 0.09]},
 ParametricPlot3D[{x, 0, 0}, {x, 6 Pi, 7 Pi}] /. 
  Line[x_] :> {Red, Arrowheads[.1], Arrow[Tube[x, 0.09]]},
 PlotRange -> All,
 Axes -> False,
 Boxed -> False
 ]

enter image description here

$\endgroup$
  • $\begingroup$ Yes, that's it. $\endgroup$ – Saeid Jun 3 '18 at 22:41
1
$\begingroup$

Also

Graphics3D[{Red, Arrowheads[.1], 
  Arrow[Tube[Table[{x, 0, If[x <= 6 Pi, Sin @ x, 0]}, {x, 0, 7 Pi, Pi/32}], 0.09]]}, 
  PlotRange -> All, Axes -> False, Boxed -> False]

enter image description here

$\endgroup$

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.