code: def segment_volume(seg):
      '''Compute the volume of a segment.
  
      Approximated as a conical frustum.
      '''
      r0 = seg[0][COLS.R]
      r1 = seg[1][COLS.R]
      h = point_dist(seg[0], seg[1])
      return math.pi * h * ((r0 * r0) + (r0 * r1) + (r1 * r1)) / 3.f segment_volume(seg):
      '''Compute the volume of a segment.
  
      Approximated as a conical frustum.
      '''
      r0 = seg[0][COLS.R]
      r1 = seg[1][COLS.R]
      h = point_dist(seg[0], seg[1])
      return math.pi * h * ((r0 * r0) + (r0 * r1) + (r1 * r1)) / 3.0
docs: Compute the volume of a segment.
  
      Approximated as a conical frustum.