[Numpy-discussion] Python function for line intersection??
Stéfan van der Walt
stefan at sun.ac.za
Fri Oct 11 02:10:21 EDT 2013
On Tue, Oct 8, 2013 at 3:15 PM, Happyman <bahtiyor_zohidov at mail.ru> wrote:
> # slope of each line
> m = (B[:, 1] - A[:, 1]) / (B[:, 0] - A[:, 0])
> b = A[:, 1] - m * A[:, 0]
Calculating the slope of a line leads to difficulties, e.g. when
dealing with vertical lines. Rather, parameterize lines as shown
here:
http://paulbourke.net/geometry/pointlineplane/
Stéfan
More information about the NumPy-Discussion
mailing list