(*This Mathematica code was written by John Zweck (zweck@utdallas.edu) and generates a mathematical curve/surface that can be printed using a 3D printer. This model can (probably) be printed by Shapeways.*)

(*If you evaluate this Mathematica notebook,the curve/surface will be rendered using computer graphics.*)

(*If you uncomment the export line at the end of the code and set the directory path appropriately for your system you will obtain an STL file that can be sent to a 3D printer.*)

(*The STL file can also be viewed using the open source software Meshlab.*)

(*You may modify this code in any way you like.*)

(*This project was supported by the National Science Foundation through a Supplement to the UTeach Dallas Robert Noyce Scholarship Program (DUE 1544159).*)

xyscale=21;
zscale=7;
radius=8;
SurfaceThickness = 2;

helixR1[t_]={xyscale*Cos[t],xyscale*Sin[t],zscale*t};

numPoints=24;
tmin=0;
tmax=3*2*Pi;

tubesR1=ParametricPlot3D[helixR1[i],{i,tmin,tmax},PlotStyle->{Tube[radius],Red},PlotPoints->numPoints,PlotRange->All];


MyCylinder = ParametricPlot3D[{xyscale*Cos[u],xyscale*Sin[u],zscale*v},
{u,0, 2*Pi},{v,0,tmax},
Mesh->False, MaxRecursion->4,  PlotStyle->{Thickness[SurfaceThickness],Green}];

MyCosWave= ParametricPlot3D[{xyscale*Cos[u],xyscale*v,zscale*u},
{u,0, tmax},{v,-2,2},
Mesh->False, MaxRecursion->4,  PlotStyle->{Thickness[SurfaceThickness],Yellow}];

MySinWave= ParametricPlot3D[{xyscale*u,xyscale*Sin[v],zscale*v},
{u,-2, 2},{v,0,tmax},
Mesh->False, MaxRecursion->4,  PlotStyle->{Thickness[SurfaceThickness],Blue}];

output1=Show[tubesR1,MyCylinder,MyCosWave]
output2=Show[tubesR1,MySinWave,MyCosWave]

(*Export["./HelixCylinderWave.pdf",output1]
Export[".//HelixTwoWaves.pdf",output2]*)