0
$\begingroup$

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.

$\endgroup$
9
  • $\begingroup$ What is your question exactly? $\endgroup$
    – march
    Commented Sep 23, 2015 at 22:48
  • $\begingroup$ How to substitute ordinary rods with bent-core rods (on spiral)? $\endgroup$
    – ATomek
    Commented Sep 23, 2015 at 23:15
  • $\begingroup$ Your helix[ ] lacks the definition $\endgroup$ Commented Sep 23, 2015 at 23:50
  • $\begingroup$ I have edited the code and added definition of helix[] (which I have previously forgot to include). $\endgroup$
    – ATomek
    Commented Sep 23, 2015 at 23:58
  • $\begingroup$ Like this? $\endgroup$
    – Michael E2
    Commented Sep 24, 2015 at 0:03

1 Answer 1

3
$\begingroup$

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

$\endgroup$
2
  • $\begingroup$ I want to recreate something like this Link $\endgroup$
    – ATomek
    Commented Sep 24, 2015 at 10:02
  • $\begingroup$ @ATomek as far as I can tell, that's what I think my solution does. $\endgroup$
    – Greg Hurst
    Commented Sep 24, 2015 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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