0
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ 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. $\endgroup$ – Kuba Dec 31 '17 at 10:52
2
$\begingroup$

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]

enter image description here

| improve this answer | |
$\endgroup$

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