Tangent Tube
Shape · (x, y, z) = f(u, v, t)
(3 · cos(u) − 0.15 · cos(v) · d/du (1.6 · sin(u)), 0.15 · sin(v) · hypot(d/du (3 · cos(u)), d/du (1.6 · sin(u))), 1.6 · sin(u) + 0.15 · cos(v) · d/du (3 · cos(u)))
Open in the app The dials and keys named below are the app's.
What it draws
A tube wrapped around a closed curve. The curve itself is an ellipse lying flat, 3cos(u) across and 1.6sin(u) along, and v runs once round the tube at each point of it.
Wrapping a tube around a straight line is easy and wrapping one around a circle is not much harder. Around anything else it needs the curve's own direction at each point, because the ring has to be swung to face along it. That direction is the derivative, and it is what the two d/du terms supply: the ring is pushed sideways by −d/du of one coordinate and forward by +d/du of the other, which is the tangent turned through a right angle.
Why the thickness changes
The tangent is used as it comes, without being reduced to unit length, so the tube is as thick as the curve is fast. An ellipse is not travelled at an even rate. At the ends of the long axis the point moves at 1.6, and at the ends of the short axis at 3. So the tube swells from 0.24 to 0.45, nearly twice as thick at the sides as at the ends.
That freedom has a limit. A tube fatter than the curve's tightest bend folds through itself, and the test is the radius multiplied by the curvature, which has to stay below 1. Here it peaks at 0.28, so the surface stays clean the whole way round.
Try
- Make the tube even by dividing both 0.15 terms by hypot(d/du (3cos(u)), d/du (1.6sin(u))). That is the tangent reduced to unit length, and the thickness stops varying.
- Fatten it to 0.6 in all three expressions. Radius times curvature goes past 1 at the ends of the long axis, where the bend is tightest, and the tube starts passing through itself there. The threshold is 0.53.
- Round the spine off by changing the 1.6 to 3. The curve is a circle now, travelled at a constant rate, so the tube is even without any help.
- Raise Turns of u to 2. The tube is laid down twice over the same ellipse, which shows how much of the surface one turn actually covers.