Re: 3D Rotations
- To: mathgroup at smc.vnet.net
- Subject: [mg125871] Re: 3D Rotations
- From: Helen Read <readhpr at gmail.com>
- Date: Thu, 5 Apr 2012 05:54:26 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <jlh0o5$t75$1@smc.vnet.net>
On 4/4/2012 4:28 AM, Mike Zentner wrote:
> I am trying to rotate a function around a variable axis to show my
> students how the solid looks and am having problems with the axis of
> rotation.
>
> Basic example:
>
> RevolutionPlot3D[x^3, {x, 0, 2}, AxesLabel -> {x, z, y}]
>
> However I want the function to rotate around an axis other than x ==
> 0, say, x == -1. I have tried the RevolutionAxis command but it isn't
> working. Any help would be appreciated.
>
Unfortunately RevolutionPlot3D will only revolve about an axis that runs
through the origin. But your can roll your own. For example, here is
sin(x) revolved around x=-2, for x from 0 to Pi.
f[x_] := Sin[x]
ParametricPlot3D[{(x + 2) Cos[t] - 2, (x + 2) Sin[t], f[x]}, {x,
0, \[Pi]}, {t, 0, 2 \[Pi]}]
You can put a bottom on it to make it look nicer when you drag and
rotate it, like this.
ParametricPlot3D[{{(x + 2) Cos[t] - 2, (x + 2) Sin[t],
f[x]}, {(x + 2) Cos[t] - 2, (x + 2) Sin[t], 0}}, {x, 0, \[Pi]}, {t,
0, 2 \[Pi]}]
Here it is revolved around y=3.
ParametricPlot3D[{x, (3 - f[x]) Cos[t], (3 - f[x]) Sin[t] + 3}, {x,
0, \[Pi]}, {t, 0, 2 \[Pi]}]
You might like to put sides on it.
plot1 = ParametricPlot3D[{x, (3 - f[x]) Cos[t], (3 - f[x]) Sin[t] +
3}, {x, 0, \[Pi]}, {t, 0, 2 \[Pi]}];
plot2 = ParametricPlot3D[{{0, 3 r Cos[t], 3 r Sin[t] + 3}, {\[Pi],
3 r Cos[t], 3 r Sin[t] + 3}}, {r, 0, 1}, {t, 0, 2 \[Pi]}];
Show[{plot1, plot2}]
I do wish that RevolutionPlot3D would take things like x==-2 or y==3 for
the RevolutionAxis. My Calculus 2 students often ask how to revolve
around something other than the x- or y-axis when we are doing volume or
surface area. I post examples online for them to see, but there really
isn't any way they are going to be able plot things like that on their
own, given that they have not yet had multi-variable calculus.
--
Helen Read
University of Vermont