(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 59565, 1429]*) (*NotebookOutlinePosition[ 60355, 1457]*) (* CellTagsIndexPosition[ 60311, 1453]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "Tubagraphics \n", StyleBox[ "(June 1999) by M A Berger, Mathematics, University College London", FontSize->12, FontColor->GrayLevel[0]] }], "Section", InitializationCell->True, FontFamily->"Courier", FontSize->24, FontColor->RGBColor[0, 0, 1]], Cell[BoxData[ \(\(Print[ "\"]\ \)\)], "Input", CellLabel->"In[1]:=", InitializationCell->True], Cell[BoxData[ \(BeginPackage["\", \ "\"]; \ Off[General::spell1]; \)], "Input", CellLabel->"In[2]:=", InitializationCell->True], Cell[CellGroupData[{ Cell["Usage Messages", "Section", InitializationCell->True, FontFamily->"Courier"], Cell[CellGroupData[{ Cell["normalize, rotate, curveinterp, todata, slidebraid", "Subsubsection", InitializationCell->True, FontFamily->"Courier"], Cell[BoxData[ \(normalize::usage\ = \ \n\ "\"; \nrotate::usage\ = \ \n\ "\"; \ncurveinterp::usage\ = \ \n\ "\"; \ntodata::usage\ = \n "\"; \n slidebraid::usage = "\"; \)], "Input", CellLabel->"In[3]:=", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell["tube, quicktube, checkedcurve", "Subsubsection", InitializationCell->True, FontFamily->"Courier"], Cell[BoxData[ \(\(tube::usage\ = \n\ \*"\"\ \!\(\[DoubleStruckCapitalR]\^3\). \n\t\ \t\n\t\tLet the variable s measure position the short way around, going from \ 0 to 1. Also let t measure position the long way around (along the axis), \ also varying from 0 to 1.\n\t\tBoth shape and color can be constants or \ functions of [s,t].\n\t\tIf shape is a number, then the radius of the tube \ will be shape. Otherwise, the radius is given by shape[s,t].\n\t\t\n\t\tColor \ can be a single graphics directive or list of graphics directives. \n\t\tAn \ assignment like color[s_,t_] := {EdgeForm[],Hue[s]} \n\t\twill automatically \ be translated to {EdgeForm[],SurfaceColor[Hue[s]]}. \n\t\tThis works for \ RGBColor, Hue, and CMYKColor, as well as the\n\t color names listed in \ AllColors (part of Graphics`Colors package automatically loaded by tuba.m).\n\ \t\t\n\t\tFor a frenettube (the default), numerical differentiation is used \ to find normal and binormals, with avoidance of flips at inflection points. \ Other algorithms are available. If the first and last points in curve are \ identical then tube assumes a closed curve. \n\t\n\t\t\tThere are several \ options:\n\t\t1. naroundtube -> na gives na points in azimuthal direction \ (default = 12);\n\t\t2. nalongtube -> nc gives nc points in axial direction \ along curve (default 40);\n\t\t3. tuberange -> myfun will only plot parts \ of the surface inside the region myfun(x,y,z) \[GreaterEqual] 0. \n\t\t4. \ tubehelicity-> hh will add hh units of twist (in units of 2\[Pi] radians). \ The default is hh = 0; this gives zero framing (zero helicity).\n \t 5. \ tubealgorithm -> xytube will plot circles perpendicular to curve in xy plane. \ tubealgorithm -> {a,b,c} gets normal by crossing tangent with fixed vector \ {a,b,c}. Default\n is frenettube, which uses normal and binormal for \ circles.\>\""; \)\)], "Input", CellLabel->"In[4]:=", InitializationCell->True], Cell["\<\ tubedefaults::usage = \"default tube options\"; tuberange::usage= \"tube option\"; tubehelicity::usage =\"tube option, default = 0\"; tubealgorithm::usage = \"tube option, default = frenettube = 1.(xytube = \ 2)\"; naroundtube::usage = \"tube option, default = 12\"; nalongtube::usage = \"tube option, default = 40 \"; frenettube::usage = \"tubalgorithm option (=1)\"; xytube::usage = \"tubealgorithm option (=2)\";\ \>", "Input", CellLabel->"In[5]:=", InitializationCell->True], Cell[BoxData[ \(quicktube::usage\ = \ "\"; \n checkedcurve::usage\ = \ "\"; \)], "Input", CellLabel->"In[13]:=", InitializationCell->True] }, Closed]], Cell[CellGroupData[{ Cell["fluxlines", "Subsubsection", InitializationCell->True, FontFamily->"Courier"], Cell[BoxData[ \(\(fluxlines::usage\ = \ "\ th gives thickness of lines th (default 0.005); 2 fluxcolor ->c determines color c of lines (default GrayLevel[0]).\>"; \)\)], "Input", CellLabel->"In[14]:=", InitializationCell->True], Cell[BoxData[ \(fluxthickness::usage\ = \ \ "\