Re: 3D Rotations

• To: mathgroup at smc.vnet.net
• Subject: [mg125955] Re: 3D Rotations
• From: "Alexander Elkins" <alexander_elkins at hotmail.com>
• Date: Mon, 9 Apr 2012 05:34:59 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <jlh0o5\$t75\$1@smc.vnet.net>

```Currently you have this cross-sectional view:
Show[Plot[x^3, {x, 0, 2}],
Graphics[{Arrowheads[{-.05, .05}], Arrow[{{0, 0}, {0, 8}}]}]]

My guess is that you want a cross-sectional view like this:

Show[Plot[(x - 1)^3, {x, 0, 2}],
Graphics[{Arrowheads[{-.05, .05}], Arrow[{{0, -1}, {0, 1}}]}]]

Just enter the following to see this as a surface of revolution:

RevolutionPlot3D[(x - 1)^3, {x, 0, 2},
AxesLabel -> (Style[#, 16, Italic] & /@ {x, z, y})]

To place several of these, use [[1]] to pick out the graphics like so:

Graphics3D[{GeometricTransformation[
RevolutionPlot3D[(x - 1)^3, {x, 0, 2}][[1]], {
{RotationMatrix[0 Degree, {0, 1, 0}], {0, 0, 2}},
{RotationMatrix[90 Degree, {0, 1, 0}], {2, 0, 0}},
{RotationMatrix[180 Degree, {0, 1, 0}], {0, 0, -2}},
{RotationMatrix[-90 Degree, {0, 1, 0}], {-2, 0, 0}}}], Thick,
Magenta, Line[{{{0, 0, -2}, {0, 0, 2}}, {{-2, 0, 0}, {2, 0, 0}}}]}]

Hope this helps...

"Mike Zentner" <zentner.mike at gmail.com> wrote in message
news:jlh0o5\$t75\$1 at smc.vnet.net...
> 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.
>

```

• Prev by Date: Re: Bug in pattern test, or I did something wrong?
• Next by Date: Re: How to generate ``nice'' algebra output from command-line mathematica?
• Previous by thread: Re: 3D Rotations
• Next by thread: subgraph error