add discretization to Line2D class