# Mathematica- Rotating a 2D plot into a 3D plot

1. Sep 8, 2010

### timman_24

I have a plot of radius and temperature. I want to plot it in 3D by rotating it about the origin to produce a 3D plot. I can not figure out how to do this in Mathematica without doing it by hand and then plugging it into the Plot3D function. Any advice would be greatly appreciated.

The plot is:

Plot[{(20 + 100 - r^2 + 4*30)/4 , (40 + 200 - 2*r^2 + 4*30)/4}, {r, -10, 10}]

2. Sep 8, 2010

### Simon_Tyler

Two options...

Plot3D[With[{r = Sqrt[x^2 + y^2]}, {1/4 (20 + 100 - r^2 + 4 30),
1/4 (40 + 200 - 2 r^2 + 4 30)}], {x, -10, 10}, {y, -10, 10},
Mesh -> Automatic, MeshStyle -> LightGray, PlotStyle -> Opacity[0.5]]

ParametricPlot3D[
r Sin[\[Theta]], {1/4 (20 + 100 - r^2 + 4 30),
1/4 (40 + 200 - 2 r^2 + 4 30)}}], {r, 0, 10}, {\[Theta], 0,
2 \[Pi]}, MeshStyle -> LightGray, PlotStyle -> Opacity[0.5]]

3. Sep 9, 2010

### timman_24

Thanks a lot, that looks great. The second one worked perfectly for what I was going for.