# 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 Dec 7 '13 at 3:17
• no i don't know how to do that but thank you. – user10977 Dec 7 '13 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? – user10977 Dec 7 '13 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 Dec 7 '13 at 3:50
• great i'm trying it now – user10977 Dec 7 '13 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}] – user10977 Dec 7 '13 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 Dec 7 '13 at 12:02
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.17135530710220337, "perplexity": 2503.2354017519715}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-51/segments/1575540555616.2/warc/CC-MAIN-20191213122716-20191213150716-00102.warc.gz"}