1

I just started working with Mathematica 8 and I'm having trouble revolving a function the way I want.

I have to revolve the function $x^2/4 +2$ and $y= 0$ around $y=6$ to form an ashtray, but I can't find how to do it.

EDIT: So far I've got :

RevolutionPlot3D[{{f[x] - 6}, {-6}}, {x, 0, 6}, RevolutionAxis -> x]

And for clarification, this is the complete surface I'm revolving (Or trying to) https://www.dropbox.com/s/irpaw37nayox414/Capture.PNG

Now I just need to revolve the explicit functions "x=0" from 0 to 2 and "x=5" 0 t0 6

  • You say you'd like to rotate about $y=6$ but that's not an axis; could you explain? – acl Mar 21 '13 at 21:43
  • Why don't you just rotate the graph of $y=x^2/4 + 2 - 6$ around the y-axis? You will get the same shape. However, I don't see an "ashtray" there: perhaps you really want to rotate this graph around the y-axis? – whuber Mar 21 '13 at 21:53
  • 1
    So the only way to do it is modifying the function?

    Either way, it worked. Thanks a bunch!

    – Fernando Contreras Mar 22 '13 at 18:36
  • Possible duplicate: http://mathematica.stackexchange.com/q/8461/121 – Mr.Wizard Mar 22 '13 at 18:43

3 Answers3

7

You'll need some of these as well:

Graphics3D[{
  Red,
  Cylinder[{{0, 0, 0}, {0.05, 0.05, 0.05}}, 1/2],
  Gray,
  Cylinder[{{0.05, 0.05, 0.05}, {0.2, 0.2, 0.2}}, 1/2],
  White,
  Cylinder[{{0.0, 0.0, 0.0}, {3, 3, 3}}, 1/2],
  Orange,
  Cylinder[{{3, 3, 3}, {4, 4, 4}}, 1/2],
  },
 Lighting -> "Neutral",
 Boxed -> False]

drawing these is a bit of a fag

cormullion
  • 24,243
  • 4
  • 64
  • 133
2

Not sure what you are expecting.

ClearAll@f;
f[x_] := x;
RevolutionPlot3D[f[x], {x, 0, 4}, RevolutionAxis -> {6, 0, 0}, AxesLabel -> {"x", "y", "z"}]

Mathematica graphics

does revolve it around an axis which, as specified, is pointing along the $x$ axis.

acl
  • 19,834
  • 3
  • 66
  • 91
1

Maybe this?

RevolutionPlot3D[(x^2/4 + 2) - 6, {x, -4, 4}, RevolutionAxis -> {1, 0, 0}]
Federico
  • 2,553
  • 16
  • 16