1
$\begingroup$

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

$\endgroup$
  • $\begingroup$ You say you'd like to rotate about $y=6$ but that's not an axis; could you explain? $\endgroup$ – acl Mar 21 '13 at 21:43
  • $\begingroup$ 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? $\endgroup$ – whuber Mar 21 '13 at 21:53
  • 1
    $\begingroup$ So the only way to do it is modifying the function? Either way, it worked. Thanks a bunch! $\endgroup$ – Fernando Contreras Mar 22 '13 at 18:36
  • $\begingroup$ Possible duplicate: mathematica.stackexchange.com/q/8461/121 $\endgroup$ – Mr.Wizard Mar 22 '13 at 18:43
7
$\begingroup$

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

| improve this answer | |
$\endgroup$
  • $\begingroup$ I'm working on it :P. Now I just need to figure out how to revolve implicit functions. $\endgroup$ – Fernando Contreras Mar 22 '13 at 18:38
  • $\begingroup$ +1 for using graphics glitches to your advantage. $\endgroup$ – Mr.Wizard Mar 22 '13 at 18:45
  • 1
    $\begingroup$ I'm glad to see you're not a smoker. (They would know that the ash is at the tip and the burning part lies between the ash and the unburned part). :-) $\endgroup$ – whuber Mar 22 '13 at 19:54
  • $\begingroup$ Took me a while to figure out where the texture came from. $\endgroup$ – s0rce Mar 23 '13 at 4:44
2
$\begingroup$

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.

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Isn't your figure revolving around the x-axis? $\endgroup$ – DavidC Mar 21 '13 at 21:49
  • $\begingroup$ @DavidCarraher oh yes, that was why I added the labels... thanks for pointing the typo out $\endgroup$ – acl Mar 21 '13 at 21:53
1
$\begingroup$

Maybe this?

RevolutionPlot3D[(x^2/4 + 2) - 6, {x, -4, 4}, RevolutionAxis -> {1, 0, 0}]
| improve this answer | |
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.