CapsuleShape
CapsuleShape[{{x1,y1,z1},{x2,y2,z2}},r]
represents the filled capsule between points {xi,yi,zi} and radius r.
Details and Options

- CapsuleShape can be used as a geometric region and graphics primitive.
- CapsuleShape[] is equivalent to CapsuleShape[{{-1,0,0},{1,0,0}},1].
- CapsuleShape[r] is equivalent to CapsuleShape[{{-1,0,0},{1,0,0}},r].
- CapsuleShape[{p1,p2},r] represents the region {pRegionDistance[Line[p1,p2],p]≤r}.
- CapsuleShape can be used in Graphics3D.
- In graphics, the points {xi,yi,zi} and radius r can be Dynamic expressions.
- Graphics rendering is affected by directives such as FaceForm, EdgeForm, Specularity, Opacity, and color.

Examples
open allclose allScope (19)
Graphics (9)
Applications (6)
Visualize the Platonic solids using CapsuleShape for the edges:
Use CapsuleShape to render edges in a GraphPlot3D:
Use CapsuleShape to render edges in 3D for Graph objects:
Embed the graph in 3D and use CapsuleShape:
Use CapsuleShape to render edges in 3D BoundaryMeshRegion and MeshRegion objects:
Using a series of capsules (and a ball), you can create a stick figure:
Furthermore, you can use RotationTransform to make the stick figure's limbs pivot:
CO2 cartridges have many applications, ranging from sports to soda-making to life jackets. A 12g CO2 cartridge is about 18.6 mm in diameter and 82.5 mm long, with a neck about 12 mm long and 7.3 mm in diameter:
It can be approximated as a capsule and a cylinder:
Knowing that the ideal gas law states , where
is the universal gas constant, find the volume of the gas within the cartridge at standard temperature and pressure (273.15 K and 1 bar):
Properties & Relations (6)
The 2D version of CapsuleShape is StadiumShape:
Ball is the limit of CapsuleShape as p1 approaches p2:
A CapsuleShape formed from the RegionUnion of balls and a cylinder:
The volume is the sum of ball and cylinder volumes:
CapsuleShape is all points at most from a Line:
ImplicitRegion can represent any CapsuleShape:
A rounded Tube looks like a CapsuleShape:
Text
Wolfram Research (2015), CapsuleShape, Wolfram Language function, https://reference.wolfram.com/language/ref/CapsuleShape.html.
CMS
Wolfram Language. 2015. "CapsuleShape." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CapsuleShape.html.
APA
Wolfram Language. (2015). CapsuleShape. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CapsuleShape.html