I'm trying to rotate 4 piecewise functions around the X-axis using RevolutionPlot3D.
The 4 functions I have are:
bottom[x_] := Piecewise[{{{2 + x - x^2/6}, 0 <= x < 3}}, Indeterminate]
side[x_] := Piecewise[{{7/2, 3 <= x < 15}}, Indeterminate]
top[x_] := Piecewise[{{{37/2 - x}, 15 <= x < 17}}, Indeterminate]
neck[x_] := Piecewise[{{3/2, 17 <= x <= 20}}, Indeterminate]
If I try to rotate all of these around the X-axis using RevolutionPlot3D, I get errors:
RevolutionPlot3D[{{bottom[x]}, {side[x]}, {top[x]}, {neck[x]}}, {x, 0, 20},
AxesLabel -> {"x", "y", "z"}, RevolutionAxis -> {1, 0, 0}]
This gives me
Dot::rect: Nonrectangular tensor encountered.
errors.
This has worked previously with other functions. I tried only the straight lines one for debugging, that is side and neck:
RevolutionPlot3D[{{side[x]}, {neck[x]}}, {x, 0, 20},
AxesLabel -> {"x", "y", "z"}, RevolutionAxis -> {1, 0, 0}]
But this actually crashes the Mathematica kernel. Any ideas how I get Mathematica to show a revolution plot around the X-axis of these 4 functions?



Piecewise[]object:Piecewise[{{2 + x - x^2/6, 0 <= x < 3}, {7/2, 3 <= x < 15}, {37/2 - x, 15 <= x < 17}, {3/2, 17 <= x <= 20}}, Indeterminate]? – J. M.♦ Oct 3 '12 at 12:38