1
$\begingroup$

I have made this atom positions on a tube:

sp = 1;  (c-c equilibrium length)
nbead = 8;
sf = nbead*sp;
radf = sf/(2*\[Pi])  (*relate to nbead*)
m = (Sqrt[3]/2)* (sp)
nmax = 18; 
           (*defines the hight 2mnmax=h*)
lcnt = 2*m*nmax
 c1 = Chop[CirclePoints[{radf, 0}, nbead]]
 c1 = Table[Insert[c1[[i]], 0, 3], {i, 1, Length[c1]}];
 c2 = Chop[CirclePoints[{radf, \[Pi]/nbead}, nbead]];
 c2 = Table[Insert[c2[[i]], m, 3], {i, 1, Length[c2]}];
 r1 = Join[c1, c2];
 Do[r1[[i]][[3]] = r1[[i]][[3]] + n (2*m), {i, 1, Length[r1]}];
 t1 = Table[r1, {n, 1, nmax}];
 t1 = Flatten[#, 1] &@t1;
 pl = ListPointPlot3D[t1]

t1 is my tube. Is there an easy way in mathematica to curve this tube and find the atoms new positions on the curved tube? I want to be able to change the curvature radius and find the new atom's positions.

Thank you so much

$\endgroup$

1 Answer 1

1
$\begingroup$

Assuming a tube with the z axis as axis and with radius 1. If we bend the tube, we assume that the axis keeps its length, but one half of the tube is compressed and the other stretched. Assuming that the centers of curvature lay on a line with x==cen, z==0, we may define a helper function that calculates the new positions of a point.

cen = 10;
bend[{x_, y_, z_}] := 
 Module[{phi = ArcTan[cen - x, z]}, {x + (cen - x) (1 - Cos[phi]), 
   y, (cen - x) Sin[phi]}]

For clarity, we assemble the points to lines along the tube parallel to the axis:

n = 10;
dat0 = Table[Append[#, z] & /@ CirclePoints[n], {z, 0, 10}] // 
   Transpose;
Graphics3D[Line /@ dat0, Axes -> True]

enter image description here

Now we replace the positions of the points by their bend positions:

dat1 = Map[bend, dat0, {2}];
Graphics3D[Line /@ dat1, Axes -> True]

enter image description here

The radius of the curvature is: cen-x

$\endgroup$
1
  • $\begingroup$ Thank you so much, I implemented the formula on my points. $\endgroup$ Commented Jul 27, 2023 at 20:13

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.