Tuba package for drawing tubes,
ribbons, and braids
This is the Mathematica package containing my
routines for drawing topological objects, including all the figures on my home
The basic function tube[curve,
color, radius] draws a tube around curve.
- The central curve can be either a function or a list of
- Closed or open curves are handled equally.
- The algorithm for drawing the surface of the tube can be chosen
from three options, including Frenet normal and binormal.
- For the Frenet option, inflection points (where the curvature
vanishes) are smoothly handled. Also, the differentiation is numerical,
which can greatly speed up evaluation.
- Tubes can be coloured as a function of position.
- The radius of the tube can be a function of position.
- Twist can be added to the tube surface.
- There are functions which draw braids, either from a set of curves
or from an Artin word.
- There is an arrow utility which draws a three dimensional arrow on
the side of a tube. The arrow automatically positions itself to be in
front, given the viewing angle.
- Download Tuba.nb
and TubaExamples.nb. (These
are for version 6).
(Versions 5 and (hopefully)
below: Tuba5.nb and TubaExamples5.nb.)
- Open tuba.nb and save it again. This should automatically generate
a file called tuba.m.
- Run examples in TubaExamples.