Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: 3D Rotations
Replies: 3   Last Post: Apr 9, 2012 5:36 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alexander Elkins

Posts: 32
Registered: 4/13/09
Re: 3D Rotations
Posted: Apr 9, 2012 5:36 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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@gmail.com> wrote in message
news:jlh0o5$t75$1@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.
>







Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.