How to plot inequalities $x^2+z^2\leq 4$, $2\leq y \leq 4$ on Maple

129 Views Asked by At

I am trying to plot the graph of the region in 3D-space defined by $$x^2+z^2\leq 4, \quad \quad 2\leq y \leq 4.$$ This is a solid circular cylinder of radius $2$ with axis $y$-axis that lies between the planes $y=2$ and $y=4$.

I used implicitplot3d in Maple to try to do this:

implicitplot3d(x^2 + z^2 <= 4, x = -5 .. 5, y = -5 .. 5, z = -5 .. 5, style = surface)

This almost gives me what I am looking for, except that the cylinder is not solid for some reason. I just obtain the outer shell, excluding the "caps" (top and bottom) of the cylinder.

How do I obtain the solid? Thank you in advance.

1

There are 1 best solutions below

1
On BEST ANSWER

There are several ways to construct the plot of such a cylinder.

As just one example,

P := plots:-display(
   plottools:-transform((x,y,z)->[x,z,y])(
     plottools:-cylinder([0,0,2], 2, 2, strips=200, style=surface))):
P;

enter image description here

plots:-display(P, labels=[x,y,z],
               view=[-5..5,-5..5,-5..5]);

enter image description here