0

Now I am working on something like this:

helix[a_, b_][t_] := {a*Cos[t], a*Sin[t], b*t}    
listept1 = Table[helix[1, 0.35][t], {t, 0, 4 Pi, .25}];
listept2 = Table[helix[0.25, 0.35][t], {t, 0, 4 Pi, .25}];
mapdecalgarde = Map[{0, 0, 0.5} + # &, {listept1}, {2}];
exterieurSup1 = Map[{0, 0, 0.1} + # &, listept1];
mapdecalgarde1 = Map[{0, 0, 0.5} + # &, listept1];
Listedepointgardecorps1 = 
Flatten[{{mapdecalgarde1}, {exterieurSup1}}, 1];
ptsGarCor1 = Transpose[Listedepointgardecorps1];
ligneGardeCor1 = Map[Line, ptsGarCor1];
barriere = Graphics3D[{Opacity[0.25], RGBColor[1, 3, 0], Tube[ptsGarCor1]}]

and simple rods I want to substitute with this particular shape:

Graphics3D[{CapForm["Round"], Tube[{{0, 100, 0}, {100, 300, 0}, {300, 300, 100}}, 40]},  Boxed -> False, PlotRange -> All]

in this orientation:

enter image description here

so it freely rotates around (let say) Z direction where XY plane alongside the twofold symmetry axis.

ATomek
  • 361
  • 2
  • 8

1 Answers1

3

Are you wanting the kinks to point directly away from the z-axis? If not I'll remove this answer.

carat[{{x_, y_, z1_}, {x_, y_, z2_}}] := 
 Translate[
  Rotate[Translate[
    Tube[{{x, y, z1}, {x + (z2 - z1)/4 Sqrt[3/7], y, (z1 + z2)/2}, {x, y, z2}}, 
     (z2 - z1)/10], {-x, -y, 0}], π + ArcTan[x, y], {0, 0, 1}], {x, y, 0}]

Graphics3D[{CapForm["Round"], Opacity[0.25], RGBColor[1, 3, 0], 
  carat /@ ptsGarCor1}, Boxed -> False]

enter image description here

Greg Hurst
  • 35,921
  • 1
  • 90
  • 136