0
$\begingroup$

It is common to rotate a plot within its own plane, but how do I rotate a 2D plot along an axis to form a 3D shape? Say I have the following plot,

ParametricPlot[{-Sqrt[x^2 - (x - 1/2)^2], x - 1/2}, {x, 1/2, 1}, 
 PlotRange -> {{-1, 0}, {0, 1}}]

enter image description here

how do I rotate it along the y-axis?

$\endgroup$
2
  • 1
    $\begingroup$ Look up RevolutionPlot3D. Without it, you could achieve the same with ParametricPlot3D. $\endgroup$
    – Szabolcs
    Commented Oct 9, 2017 at 8:04
  • $\begingroup$ @Szabolcs: It worked! $\endgroup$
    – 2ub
    Commented Oct 9, 2017 at 8:07

1 Answer 1

1
$\begingroup$

You can do it with RevolutionPlot3D:

f[x_] := Sin[1/x];
ParametricPlot[{x, f[x]}, {x, -1, 1}]
RevolutionPlot3D[f[x], {x, 0, 1}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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