You can use the Method
option to get an n-gonal prism inscribed in a clylinder in two ways:
- Use the
Method
suboption "CylinderPoints" -> n
, or
- Use
Tube
instead of Cylinder
with the Method
suboption "TubePoints" -> n
Row[{Graphics3D[{ Opacity[.5, Blue],Cylinder[{{10, 9, 8}, {1, 2, 3}}, 2]},
ImageSize -> 300],
Graphics3D[{Opacity[.5, Red], Cylinder[{{10, 9, 8}, {1, 2, 3}}, 2]},
Method -> {"CylinderPoints" -> 6}, ImageSize -> 300],
Graphics3D[{ CapForm["Butt"], Opacity[.5, Green], Tube[{{10, 9, 8}, {1, 2, 3}}, 2]},
Method -> {"TubePoints" -> 6}, ImageSize -> 300]}]
With the second method we can have cylinders and inscribed prisms in the same graphics (We cannot do this with the first method since the option "CylinderPoints" -> n
applies to all Cylinder
objects):
Graphics3D[{ Opacity[.4, Blue],
Cylinder[{{10, 9, 8}, {1, 2, 3}}, 2],
CapForm["Butt"], Opacity[.5, Red],
Tube[{{10, 9, 8}, {1, 2, 3}}, 2]},
Method -> {"TubePoints" -> 4}, ImageSize -> Large]