Cylinder

Cylinder[{{x1,y1,z1},{x2,y2,z2}},r]
represents a cylinder of radius r around the line from to .

Cylinder[{{x1,y1,z1},{x2,y2,z2}}]
represents a cylinder of radius 1.

DetailsDetails

  • 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 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 and radii .

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

A unit radius and two units height cylinder:

In[1]:=
Click for copyable input
Out[1]=

A cylinder from the origin to with radius :

In[1]:=
Click for copyable input
Out[1]=

Differently styled cylinders:

In[1]:=
Click for copyable input
Out[1]=

Volume and centroid:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
Introduced in 2007
(6.0)
| Updated in 2014
(10.0)