def segment(self):
        """
        A line segment which if inflated by cylinder radius
        would represent the cylinder primitive.

        Returns
        -------------
        segment : (2, 3) float
          Points representing a single line segment
        """
        # half the height
        half = self.primitive.height / 2.0
        # apply the transform to the Z- aligned segment
        points = np.dot(
            self.primitive.transform,
            np.transpose([[0, 0, -half, 1], [0, 0, half, 1]])).T[:, :3]
        return points
def segment ( self ) : half = self . primitive . height / 2.0 points = np . dot ( self . primitive . transform , np . transpose ( [ [ 0 , 0 , - half , 1 ] , [ 0 , 0 , half , 1 ] ] ) ) . T [ : , : 3 ] return points
A line segment which if inflated by cylinder radius
        would represent the cylinder primitive.

        Returns
        -------------
        segment : (2, 3) float
          Points representing a single line segment