0
$\begingroup$

I want to re-create this pattern (apart from arrows which play only role of direction indicators; black line is a Sin/Cos function):

enter image description here

I came up (for now) with this solution (code below). How to adjust the code so the kinks of those tubes are points on the Sin/Cos function?

helix[a_, b_][t_] := {a*Cos[t], a*Sin[t], b*t}
listept1 = Table[helix[.45, 0.45][t], {t, 0, 4 Pi, \[Pi]/4}];
listept2 = Table[helix[0.25, 0.35][t], {t, 0, 4 Pi, .61}];
mapdecalgarde = Map[{0, 0, .25} + # &, {listept1}, {2}];
exterieurSup1 = Map[{0, 0, .25} + # &, listept1];
mapdecalgarde1 = Map[{0, 0, .5} + # &, listept1];
Listedepointgardecorps1 = 
  Flatten[{{mapdecalgarde1}, {exterieurSup1}}, 1];
ptsGarCor1 = Transpose[Listedepointgardecorps1];
    carat[{{x_, y_, z1_}, {x_, y_, z2_}}] := 
      Translate[
        Rotate[
          Translate[
            Tube[
              {{x, y, z1}, {x + (z2 - z1)/3, y, (z1 + z2)/2}, {x, y, z2}}, 
              (z2 - z1)/10], 
            {-x, -y, 0}], 
           2 π, {0, 0, 1}], 
        {x, 0, 0}]
    tube = 
      Graphics3D[{
        Opacity[0.2], Yellow, EdgeForm[Opacity[.2]], 
        Cylinder[{{0, 0, 0}, {0, 0, 2 Pi}}, 0.6]}];
    Ntb = Graphics3D[{RGBColor[0, 3, 0], carat /@ ptsGarCor1}];
    Show[{tube, Ntb}, Boxed -> False]
$\endgroup$
1
$\begingroup$

Perhaps you can modify the Frenet classic formulas to suit you:

r[a_, b_][t_] := {a*Cos[t], a*Sin[t], b*t}
uT[a_, b_][t_] := Normalize[r[a, b]'[t1]] /. t1 -> t
vN[a_, b_][t_] := Normalize[uT[a, b]'[t1]] /. t1 -> t
vB[a_, b_][t_] := Normalize[Cross[r[a, b]'[t1], r[a, b]''[t1]]] /. t1 -> t

a = 1; b = 1;
Manipulate[Show[
  ParametricPlot3D[{r[a, b][t]}, {t, -Pi/a, Pi/a}, 
   PlotRange -> {{-2, 2}, {-2, 2}, {-2, 3}}],
  Graphics3D[{
    {Thick, Darker@Green, 
     Tube[{r[a, b][s], r[a, b][s] + uT[a, b][s]}, .1]}, {Thick, 
     Darker@Red, 
     Tube[{r[a, b][s], r[a, b][s] + vB[a, b][s]}, .1]}, {Thick, 
     Darker@Cyan, 
     Tube[{r[a, b][s], r[a, b][s] + vN[a, b][s]}, .1]}}]], {s, 0, 1}]

Mathematica graphics

| improve this answer | |
$\endgroup$
  • $\begingroup$ Unfortunately, it is still not the thing I am looking for. I am not sure if it is visible on sketch but this 3D "boomerang" is in plane of a Sin/Cos function. The position of the kink is defined by the values of Sin/Cos function. In general shape of the "boomerang" maintains constant. $\endgroup$ – ATomek Sep 26 '15 at 19:33

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.