I'm trying to render a 3D image of a path by extruding a circular cross-section along the path, to create a "snake-like" path.
Here is an image I found to illustrate:

I can't seem to figure out if there is a way to do this?
I just found the Tube command; now I need to find a way to turn a set of points into a curve. Basically, I need to find the necessary control points for a BezierCurve or a BSplineCurve to fit a set of {x, y} coordinates.
Can the Interpolation with the Spline method be used to generate a spline from a set of points?
Answer
In Mathematica 7 or 8, you can just use Tube. Please see the docs for many, many examples.
Example:
Show[ParametricPlot3D[{Cos[x], Sin[x], x/5}, {x, 0, 15}] /.
Line -> (Tube[#, 0.2] &), PlotRange -> All]

Comments
Post a Comment