function line,pt1,pt2 pt1=double(pt1) pt2=double(pt2) slope=(pt2[1]-pt1[1])/(pt2[0]-pt1[0]) intercept=((pt1[1]-slope*pt1[0])+(pt2[1]-slope*pt2[0]))/2 return,[slope,intercept] end