# How to draw tubes around the edges of a three-dimensional object?

Suppose I have a three-dimensional object (such as a cylinder, or some finite parametric surface). Is there any easy way to draw tubes with given radius around the edges of the object (i.e., tubes which have the edges as guiding curves)?

• Do you have the parametric equation of the edges,or do you want to "automagically" detect them? (The later is much more difficult!) – Dr. belisarius Nov 28 '14 at 14:47
• The latter, really. I already sort of guessed it wouldn't be easy, but you never know. – Kim Fierens Nov 28 '14 at 14:49
• This is why it could be difficult, even for easy curves: The boundaries aren't just the edges :ParametricPlot3D[{Cos[u], Sin[u], 2 v}, {u, 0, 2 Pi}, {v, 0, 1}, Mesh -> None, BoundaryStyle -> Black, PlotStyle -> FaceForm[Transparent], Boxed -> False] – Dr. belisarius Nov 28 '14 at 14:55

## 1 Answer

This isn't clever at all, basically because it doesn't "detect" the edges on its own, but I don't know of anything better:

f[u_, v_] := {Cos[u], Sin[u], v};
Show[
ParametricPlot3D[f[u, v], {u, 0, 2 Pi}, {v, 0, 1}, Mesh -> None,
Boxed -> False, Axes -> False, PlotRangePadding -> .2],
ParametricPlot3D[f[u, 1], {u, 0, 2 Pi}, Mesh -> None, Boxed -> False,
Axes -> False] /. Line[x_] :> Tube[x, .08]
]


• Pretty neat though. I could work with that. Thanks! – Kim Fierens Nov 29 '14 at 3:02