1
$\begingroup$

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)?

$\endgroup$
  • $\begingroup$ Do you have the parametric equation of the edges,or do you want to "automagically" detect them? (The later is much more difficult!) $\endgroup$ – Dr. belisarius Nov 28 '14 at 14:47
  • $\begingroup$ The latter, really. I already sort of guessed it wouldn't be easy, but you never know. $\endgroup$ – Kim Fierens Nov 28 '14 at 14:49
  • $\begingroup$ 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] $\endgroup$ – Dr. belisarius Nov 28 '14 at 14:55
2
$\begingroup$

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]
 ]

Mathematica graphics

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.