I have a Graphics3D issue, I have a cylinder within a cylinder. I want to generate a surface from a quarter circle, but the quarter circle should be "curving outward". The normal surface generated for a quarter circle "curving inward" is a hemisphere. I do not know if this surface has a specific name but it is similar to a wormhole, although the wormhole is somehow like a hyperboloid. The surface should start from the inner cylinder and ending perpendicularly on the outer cylinder, that is why I'm not using a hyperboloid for this surface. I have drawn a quarter circle curve below, if you rotate it by $2 \pi$ then that is the surface I'm looking for.

rbelow = 0.5;
dbelow = {0, 0, -1};
rabove = 0.5;
dabove = {0, 0, 1};
HemisphereBelow = ParametricPlot3D[rbelow {Cos[u] Sin[v], Sin[u] Sin[v], Cos[v]} + dbelow, {u, -\[Pi]/2, \[Pi]/2}, {v, -\[Pi]/2, \[Pi]/2}, PlotStyle -> Blue, Mesh -> None, Boxed -> False, Axes -> None][[1]];
HemisphereAbove = ParametricPlot3D[rabove {Cos[u] Sin[v], Sin[u] Sin[v], Cos[v]} + dabove, {u, -\[Pi]/2, \[Pi]/2}, {v, \[Pi]/2, 3 \[Pi]/2}, PlotStyle -> Blue, Mesh -> None, Boxed -> False, Axes -> None][[1]];
Graphics3D[{Opacity[0.05, Black], Cylinder[], Opacity[0.2, Green], Cylinder[{{0, 0, -1}, {0, 0, 1}}, 0.5], Opacity[0.5, Blue], HemisphereBelow, Opacity[0.5, Blue], HemisphereAbove}, Boxed -> False]



I'm not 100% clear from your description, but I think this what you want:

RevolutionPlot3D[Sqrt[0.5^2 - (r - 1)^2], {r, 0.5, 1}]

enter image description here

This works because the equation for the upper half of a circle of radius $r$ centered at $x_0$ is $y = \sqrt{r^2 - (x-x_0)^2}$. With $r= 1/2$ & $x_0 = 1$, the quarter-circle you want can be obtained by plotting this from $1/2$ to $1$. RevolutionPlot3D then takes this curve and rotates it about the $x$-axis.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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