(*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).*)

(* This model probably won't pass Shapeways tests. Let me know if you fix it! *)

(* I learned about tbis surface from Thomas Banchoff's web site:
http://www.math.brown.edu/~banchoff/art/PAC-9603/tour/viviani/viviani.html

Also, the intersection of a sphere and an offcenter cylinder is a curve that is the shadow onto the surface of the earth of a satellite that is in perfect geosynchronous orbit about the earth. I discuss this orbit in my paper 
An Analysis of the Methods Used to Reconstruct the Flight Path of Malaysia Airlines Flight 370[to appear in Education Section of SIAM Review in mid 2016] *)

SphereRadius=2;

TempleOfViviani=ParametricPlot3D[{SphereRadius*Sin[Phi]*Cos[Theta],SphereRadius*Sin[Phi]*Sin[Theta],SphereRadius*Cos[Phi]},{Phi,0,Pi/2},{Theta,0,2*Pi}, RegionFunction->Function[{x,y,z},1  < (x-1)^2+y^2],MaxRecursion->15,Mesh->False,PlotStyle->{Thickness[0.05]}];

output=Show[TempleOfViviani]

(*Export["TempleOfViviani.stl",output]*)