Problems with Show Command and Surfaces of Revolution
- To: mathgroup at smc.vnet.net
- Subject: [mg63999] Problems with Show Command and Surfaces of Revolution
- From: "Ruben" <rubgb at yahoo.com>
- Date: Fri, 27 Jan 2006 05:13:10 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Hi there, I recently downloaded the electronic version of "The Beginner's guide to Mathematica" version 4 and I've been having difficulties implementing one of the examples in chapter 68 in Mathematica 4.1: Needs["Graphics`SurfaceOfRevolution`"] AnnotatedSurfaceOfRevolution[f_, {x_, xmin_, xmax_}, options___] := Module[{surfacePlot, linePlot, axisPlot, axis, plotRange}, axis = RevolutionAxis /. {options} /. Options[SurfaceOfRevolution]; surfacePlot = SurfaceOfRevolution[f, {x, xmin, xmax}, options, DisplayFunction -> Identity]; linePlot = Graphics3D[{Thickness[0.02], RGBColor[1, 0, 0], Line[Table[{x, 0, f}, {x, xmin, xmax, (xmax - xmin)/30}]]}]; axisPlot = Graphics3D[{Thickness[0.02], RGBColor[0, 0, 1], Line[{-100 axis, 100 axis}]}]; plotRange = FullOptions[surfacePlot, PlotRange]; Show[surfacePlot, linePlot, axisPlot, PlotRange -> plotRange, DisplayFunction -> $DisplayFunction]] onePlot[f_, range_, r_, axis_] := AnnotatedSurfaceOfRevolution[f, range, PlotRange -> {{-r, r}, {-r, r}, {-r, r}}, RevolutionAxis -> axis, Boxed -> False, Axes -> None] MultipleSurfaceOfRevolutionPlot[f_, range_, r_] := Show[ { onePlot[f, range, r, {1, 0, 0}, DisplayFunction -> Identity], onePlot[f, range, r, {0, -1, 0}, DisplayFunction -> Identity], onePlot[f, range, r, {0, 0, 1}, DisplayFunction -> Identity] }, DisplayFunction -> $DisplayFunction]; After having loaded the package and defined the functions, when I try: MultipleSurfaceOfRevolutionPlot[Sin[x], {x, 0, 2 Pi}, 7]; I get a show::gcomb message error. Does anybody know what's going on? Many thanks in advance, Ruben