geometry Representing Lines Pair of Points

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Given a pair of points A and B in a vector space of arbitrary dimension, one can describe the line between them as

X = A + t*(B - A) = (1 - t)*A + t*B

so in 2d this would be

x = Ax + t*(Bx - Ax) = (1 - t)*Ax + t*Bx
y = Ay + t*(By - Ay) = (1 - t)*Ay + t*By

As t assumes any real value, this will produce all points along the line. The representation is not unique, as any pair of distinct points along the line will describe the same line. It is easy to switch between full line and line segment using this representation, since restricting t to the range [0, 1] will yield a line segment instead.



Got any geometry Question?