# How to Plot the Surface Generated by a Curve Revolved about a Line which doesn't go through the Origin [duplicate]

I would like to plot the 3D surface generated by revolving the 2D curve f(x)=x^2 about the axis y=1. It seems RevolutionPlot3D[] only allows you to choose an axis that passes through the origin with the RevolutionAxis option with a single vector. The code below generates the graph but revolved around the x-axis (y=0).

RevolutionPlot3D[t^2, {t, 0, 20}, {\[Theta], 0, Pi},
Mesh -> None, RevolutionAxis -> {1, 0, 0},
PerformanceGoal -> "Quality", PlotRange -> 10]


If I can't modify RevolutionPlot[] to suit my need, how you would suggest I go about achieving this functionality?

• See J.M.'s answer in a linked topic. Another one related: 8512 p.s. as always, let me know if you disagree with closing. – Kuba Dec 31 '17 at 10:52

## 1 Answer

First thing that came to mind is to use Translate (or GeometricTransformation more generally). ...plus a few styling tips.

revplt = RevolutionPlot3D[t^2, {t, 0, 20}, {θ, 0, Pi},
RevolutionAxis -> "X", MeshFunctions -> {#1 &}, Mesh -> 100,
PlotStyle -> Opacity[.6], PlotPoints -> 60];

Graphics3D[{
Translate[revplt[[1]], {0, 1, 0}],
{Red, Thick, Dashed, InfiniteLine[{0, 1, 0}, {1, 0, 0}]}
}, PlotRange -> 3,
AxesLabel -> (Style[#, 15, Blue] & /@ {"X", "Y", "Z"}),
AxesOrigin -> {0, 0, 0}, Axes -> True, Boxed -> False]