How to curve a nanotube in any shape? A nanotube could be described as a set of discrete points forming a hollow cylinder.
How to curve this nanotube (this set of points) in an arbitrary shape using an  equation, like a helix, paraboloid, cone, spiral or another form?
Thanks,
 A: Given a smooth parametric curve ${\bf x} = {\bf \gamma}(t)$, $a \le t \le b$, there are various ways to try to model a "cylinder" of constant radius $\rho$ with central axis on the curve.  None are perfect because bending a cylinder will inevitably create distortions, and sometimes kinks: a bent cylinder is not isometric to a straight cylinder.  
For example, if ${\bf T}(t), {\bf N}(t), {\bf B}(t)$ is the Frenet-Serret frame of the curve, you could take the cylinder as given parametrically by
$$ {\bf x} = \gamma(t) + \rho \cos(\theta) {\bf N}(t) + \rho \sin(\theta) {\bf B}(t), \ 0 \le \theta \le 2\pi,\ a \le t \le b $$
With this choice, a plane through $\gamma(t)$ orthogonal to the tangent vector ${\bf T}(t)$ intersects the cylinder in a circle of radius $\rho$ centred at $\gamma(t)$.
EDIT: Here is an example in Maple, for the curve
$$ x = \cos(t), \ y = \sin(t), \ z = \sin(2t)/2 $$
with(VectorCalculus):
X:= <cos(t),sin(t),sin(2*t)/2>: # position vector
V:= diff(X,t): # velocity vector
T:= V/simplify(sqrt(V^%T . V)): unit tangent vector
A:= diff(V,t): # acceleration vector
VA:= simplify(CrossProduct(V,A)): # V x A 
B:= VA/simplify(sqrt(VA^%T . VA)): # binormal vector
N:= simplify(CrossProduct(B, T)): # principal normal vector
rho:= 1/10: # radius of tube
plot3d(X + rho*cos(theta)*N + rho*sin(theta)*B, t=0..2*Pi,
 theta=0..2*Pi,scaling=constrained,style=patchnogrid,
 lightmodel=light2);


