move segment by distance
    Args:
      p1, p2: point(x, y)
      rad: relative direction angle(radian)
      dist: distance
    Return:
      translated segment(p1, p2)

def m_seg(p1, p2, rad, dist):
    """ move segment by distance
    Args:
      p1, p2: point(x, y)
      rad: relative direction angle(radian)
      dist: distance
    Return:
      translated segment(p1, p2)
    """
    v = vector(p1, p2)
    m = unit(rotate(v, rad), dist)
    return translate(p1, m), translate(p2, m)