Mathematica > Visualization and Graphics > Symbolic Graphics Language > Graphics Objects >

Cylinder

Updated In 7 Graphic
Cylinder[{{x1, y1, z1}, {x2, y2, z2}}, r]
represents a cylinder of radius r around the line from (x1, y1, z1) to (x2, y2, z2).
Cylinder[{{x1, y1, z1}, {x2, y2, z2}}]
represents a cylinder of radius 1.
  • Cylinder represents the whole filled cylinder, not just the surface.
  • The ends of the cylinder are disks.
  • The cylinder radius can be specified either in absolute coordinates, or as Scaled[s].
  • Colors and other material properties of cylinders can be specified using color directives as well as Specularity and Glow.  »
  • Cylinders can be specified as transparent using Opacity directives.  »
  • Cylinder[{spec1, spec2, ...}] represents a collection of cylinders of radius 1.
  • Cylinder[{spec1, spec2, ...}, r] represents a collection of cylinders of radius r.
  • Cylinder[{spec1, spec2, ...}, {r1, r2, ...}] represents a collection of cylinders with specifications speci and radii ri.
A unit radius and unit height cylinder:
In[1]:=
Click for copyable input
Out[1]=
A cylinder from the origin to {1, 1, 1} with radius 1/2:
In[2]:=
Click for copyable input
Out[2]=
 
Differently styled cylinders:
In[1]:=
Click for copyable input
Out[1]=
New in 6 | Last modified in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team