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$
3
  • $\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$ Commented Nov 28, 2014 at 14:47
  • $\begingroup$ The latter, really. I already sort of guessed it wouldn't be easy, but you never know. $\endgroup$ Commented Nov 28, 2014 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$ Commented Nov 28, 2014 at 14:55

1 Answer 1

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$
1
  • $\begingroup$ Pretty neat though. I could work with that. Thanks! $\endgroup$ Commented Nov 29, 2014 at 3:02

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.