# How to create a plot of the volume between three surfaces

I need help creating a plot that I can manipulate the variables for the volume between three surfaces. I am trying to make it look like this example here: http://demonstrations.wolfram.com/ExploringCylindricalCoordinates/ but with the volume I need.

It is volume that lies within the cylinder x^2+y^2=1, above the plain z=0 ,and below the cone z^2=4x^2+4y^2. I converted to cylindrical coordinates (z,r,theta). Here is what I have so far.:

Show[RevolutionPlot3D[2 r, {r, 0, 1}, {theta, 0, Pi}],
ParametricPlot3D[{Cos[u], Sin[u], v}, {u, 0, Pi}, {v, 0, 2}]]


thank you

• You could tag on triangles in the y=0 plane and the half-disk floor in the z=0 plane, not sure if that's good enough :)
– ssch
Commented Dec 7, 2013 at 3:17
• no i don't know how to do that but thank you. Commented Dec 7, 2013 at 3:18

For the static plot in the question, the missing pieces are two triangular walls in the y=0 plane an a half-disk floor in the z=0 plane

Show[
(* Put the half-disk floor in here, just a constant 0 function *)
RevolutionPlot3D[{{2 r}, {0}}, {r, 0, 1}, {theta, 0, Pi}],
ParametricPlot3D[{Cos[u], Sin[u], v}, {u, 0, Pi}, {v, 0, 2}],
(* And the triangles here *)
Graphics3D[{
Polygon[{{0, 0, 0}, {1, 0, 0}, {1, 0, 2}}],
Polygon[{{0, 0, 0}, {-1, 0, 0}, {-1, 0, 2}}]
}],
AxesLabel -> {x, y, z}]


You can parameterize the triangles too of course:

Show[
RevolutionPlot3D[{{2 r}, {0}}, {r, 0, 1}, {theta, 0, Pi}],
ParametricPlot3D[{
{Cos[u], Sin[u], v},
u/Pi {1, 0, v},
u/Pi {-1, 0, v}
}, {u, 0, Pi}, {v, 0, 2}],
AxesLabel -> {x, y, z}, PlotRange -> All]

• WOW thank you very much you are the man!! i really appropriate it. hopefully I'm not asking too much of you but could you point me in the right direction for adding the variable sliders to the graph. Will the "Manipulate" command do it or is there another method? Commented Dec 7, 2013 at 3:38
• @user10977 Manipulate is the tool for the job. Hint to generalize the triangles: The second triangle parametrization in this case can be written as u/Pi { Cos[Pi], Sin[Pi], v}
– ssch
Commented Dec 7, 2013 at 3:50
• great i'm trying it now Commented Dec 7, 2013 at 4:18
• I'm sorry I don't understand Manipulate[ Show[RevolutionPlot3D[{{2 r}, {0}}, {r, 0, 1}, {theta, 0, Pi}], ParametricPlot3D[{{Cos[u], Sin[u], v}, u/Pi {Cos[Pi], Sin[Pi], v}}, {u, 0, Pi}, {v, 0, 2}, PlotRange -> All], AxesLabel -> {x, y, z}, PlotRange -> All], {{r, 1}, 0, 2}, {{u, 0}, 0, 2 Pi}, {{v, 0}, 0, 2}] Commented Dec 7, 2013 at 4:44
• @user10977 There you have one Manipulate variable called v and one ParametricPlot3D variable called v that easily gets confusing for both humans and mathematica, perhaps call the Manipulate variable vmax and make the ParametricPlot3D range {v, 0, vmax}
– ssch
Commented Dec 7, 2013 at 12:02