Tube

Tube[{{x1,y1,z1},{x2,y2,z2},}]

represents a 3D tube around the line joining a sequence of points.

Tube[{pt1,pt2,},r]

represents a tube of radius r.

Tube[{{pt11,pt12,},{pt21,},},]

represents a collection of tubes.

Tube[curve,]

represents a tube around the specified 3D curve.

Details and Options

  • Tube renders as a circular 3D tube in Graphics3D.
  • The radius of the tube can be specified either in absolute coordinates, or as Scaled[s].
  • If no explicit radius is specified, Tube uses a small scaled radius.
  • Tube[{pt1,pt2,},{r1,r2,}] specifies a different tube radius at the position of each of the points pti.
  • Tube[{pt1,pt2,},] gives a tube consisting of a sequence of straight segments. It is equivalent to Tube[Line[{pt1,}],].
  • The following curve specifications can be used:
  • Line[]piecewise line segments
    BezierCurve[]composite Bezier curve
    BSplineCurve[]B-spline curve
  • By default, the joins between tube segments are rounded.
  • Different forms of joining between tube segments can be specified using JoinForm.
  • By default, the ends of the tube are rounded.
  • Different caps for the tube can be specified using CapForm.
  • CapForm[None] specifies that the end of the tube should be left open.
  • In Tube[curve,], curve can have head BezierCurve, BSplineCurve, or Line.
  • Colors and other material properties of tubes can be specified using color directives as well as Specularity and Glow.
  • Tubes can be specified as transparent using Opacity directives.
  • Individual coordinates and lists of coordinates in tubes can be Dynamic objects.

Examples

open allclose all

Basic Examples  (4)

A tube primitive:

A tube along a curve:

A tube with radius .1:

Differently styled tubes:

Scope  (16)

Tube Specification  (7)

Single tube segment:

Multiple connected tube segments:

Multiple disconnected tube segments:

Tubes with different radii:

Radii can also be specified at vertices:

Tubes with scaled radii:

Tube can take a line or curve argument:

Tube Styling  (8)

Colored tubes:

Different properties can be specified for the front and back faces using FaceForm:

Tubes with different specular exponents:

White tube that glows red:

Opacity specifies the face opacity:

Tube caps can be specified using CapForm:

Joining of tube segments can be specified using JoinForm:

Colors can be specified at vertices using VertexColors:

Coordinate Specification  (1)

Use Scaled coordinates:

Options  (1)

VertexColors  (1)

Use VertexColors to vary the colors along the tube:

Applications  (4)

PieChart3D uses Tube to produce donut charts:

Plot a parametric space curve and replace the curve with a tube:

Tube can be used with Arrow for full 3D arrows:

A random 3D walk:

Use Tube for 3D edges in GraphPlot3D:

Obtain directed edges using Arrow:

Properties & Relations  (6)

Use Scale to get an elliptical tube:

Use Arrow with Tube to get a full 3D arrow:

Cone is a special case of Tube:

Get a truncated cone by specifying different radii in Tube:

Cylinder is a special case of Tube:

Get curved cylinder by using additional points:

A parametric specification of a tube generated using ParametricPlot3D:

An implicit specification of a tube generated by ContourPlot3D:

Possible Issues  (1)

Tube objects can only use machine-number coordinates:

Neat Examples  (4)

A random collection of tube curves:

Tubes with interpolated colors:

Tube curves with interpolated radii:

Using random radii:

Wolfram Research (2008), Tube, Wolfram Language function, https://reference.wolfram.com/language/ref/Tube.html (updated 2010).

Text

Wolfram Research (2008), Tube, Wolfram Language function, https://reference.wolfram.com/language/ref/Tube.html (updated 2010).

CMS

Wolfram Language. 2008. "Tube." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2010. https://reference.wolfram.com/language/ref/Tube.html.

APA

Wolfram Language. (2008). Tube. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Tube.html

BibTeX

@misc{reference.wolfram_2024_tube, author="Wolfram Research", title="{Tube}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/Tube.html}", note=[Accessed: 04-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_tube, organization={Wolfram Research}, title={Tube}, year={2010}, url={https://reference.wolfram.com/language/ref/Tube.html}, note=[Accessed: 04-November-2024 ]}