(*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).*)
scale=50;
radius = 3;

Surface[r_,theta_]={scale*r*Cos[theta],scale*r*Sin[theta],scale*Sin[2*theta]};

rmin=0;
rmax=0.75;

NumRays=8;

numPoints=24;

thetamin=0;
thetamax=2*Pi;

zAxis=ParametricPlot3D[Surface[0,i],{i,thetamin,thetamax},PlotStyle->Tube[radius],PlotPoints->numPoints,PlotRange->All];

OuterCurve=ParametricPlot3D[Surface[rmax,i],{i,thetamin,thetamax},PlotStyle->Tube[radius],PlotPoints->numPoints,PlotRange->All];

RaysTable=Table[Surface[r,j],{j,thetamin,thetamax,(thetamax-thetamin)/NumRays}];

Rays=ParametricPlot3D[RaysTable,{r,rmin,rmax},PlotStyle->Tube[radius],PlotPoints->numPoints,PlotRange->All];

Vertices =Graphics3D[Table[Sphere[Surface[i,j],radius],{i,rmin,rmax,rmax-rmin},{j,thetamin,thetamax,(thetamax-thetamin)/NumRays}]];

SurfaceSheet=ParametricPlot3D[Surface[r,theta],{r,rmin,rmax },{theta,thetamin,thetamax+0.2},Mesh->False, MaxRecursion->4, PlotStyle->{Thickness[2.0]}];

output=Show[zAxis,OuterCurve,SurfaceSheet]

(*Export["LimitDNEViaRaysSheet.stl",output];*)