represents a cylinder of radius r around the line from (x1,y1,z1) to (x2,y2,z2).


represents a cylinder of radius 1.

Details and Options

  • Cylinder can be used as a geometric region and a graphics primitive.
  • Cylinder[] is equivalent to Cylinder[{{0,0,-1},{0,0,1}}]. »
  • Cylinder represents a filled cylinder region where and the vectors are orthogonal with TemplateBox[{{v, _, 1}}, Norm]=TemplateBox[{{v, _, 2}}, Norm]=1, and and .
  • Cylinder can be used in Graphics3D.
  • In graphics, the points pi and radii r can be Scaled and Dynamic expressions.
  • Graphics rendering is affected by directives such as EdgeForm, FaceForm, Specularity, Opacity, and color.
  • Cylinder[{spec1,spec2,},{r1,r2,}] represents a collection of cylinders with specifications speci and radii ri.


open allclose all

Basic Examples  (4)

A unit radius and two units height cylinder:

A cylinder from the origin to {1,1,1} with radius 1/2:

Differently styled cylinders:

Volume and centroid:

Scope  (23)

Graphics  (13)

Specification  (5)

If no radius is specified, it is assumed to be 1:

Cylinders with different radii:

Cylinders with different directions:

Short form for a cylinder centered at the origin with a radius 1:

Multiple cylinders:

Styling  (5)

Color directives specify the face colors of cylinders:

FaceForm and EdgeForm can be used to specify the styles of the faces and edges:

Different properties can be specified for the front and back faces using FaceForm:

Cylinders with different specular exponents:

Black cylinder that glows red:

Opacity specifies the face opacity:

Coordinates  (3)

Use Scaled coordinates:

Use Scaled radius:

Points can be Dynamic:

Regions  (10)

Embedding dimension is the dimension of the space in which the cylinder lives:

Geometric dimension is the dimension of the shape itself:

Membership testing:

Get conditions for membership:



Distance from a point:

The equidistance contours for a cylinder:

Signed distance from a point:

Nearest point in the region:

Nearest points to an enclosing sphere:

A cylinder is bounded:

Find its range:

Integrate over a cylinder region:

Optimize over a cylinder region:

Solve equations in a cylinder region:

Applications  (6)

Find the minimum surface area for a cylinder with volume :

Compare with some other cylinders of the same volume:

Platonic solids:

A simple 3D bar chart:

Use Cylinder to render edges in a GraphPlot3D:

Define a ChartElementFunction based on Cylinder:

BarChart3D uses Cylinder to produce 3D bar charts:

Histogram3D can similarly use Cylinder:

Use Cylinder to display bubbles in BubbleChart3D:

Properties & Relations  (5)

Use Scale to get elliptical cylinders:

A parametric specification of a cylinder shell generated using ParametricPlot3D:

An implicit specification of a cylinder shell generated by ContourPlot3D:

ChemicalData plots a molecule using spheres and cylinders:

ImplicitRegion can represent any Cylinder region:

Neat Examples  (3)

Random unit cylinders:

Sweep a cylinder around an axis:

Nested transparent cylinders:

Wolfram Research (2007), Cylinder, Wolfram Language function, (updated 2014).


Wolfram Research (2007), Cylinder, Wolfram Language function, (updated 2014).


Wolfram Language. 2007. "Cylinder." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014.


Wolfram Language. (2007). Cylinder. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_cylinder, author="Wolfram Research", title="{Cylinder}", year="2014", howpublished="\url{}", note=[Accessed: 25-July-2024 ]}


@online{reference.wolfram_2024_cylinder, organization={Wolfram Research}, title={Cylinder}, year={2014}, url={}, note=[Accessed: 25-July-2024 ]}