I have to draw a tube, aligned along a sine wave in the (x,y) plane. The length and radius of the tube is known. I have read in the Wikipedia page https://en.wikipedia.org/wiki/Channel_surface that this surface is called a "pipe" surface and that the parametric equations are given in the 3D space by
x=x(u,v)=c(u)+R*(e1(u)cos(v)+e2(u)sin(v))
where r is the radius of the pipe, u->c(u) is the parametric equation of the curve, (e1(u),e2(u)) two vectors forming a basis of the normal plane at c(u) and v is the parameter of the circle (from 0 to 2*pi).
How can I apply this for a sinus curve in the plane and plot the resulting surface with Scilab ?