Use A plus t times the segment direction to locate one exact point on a line segment.

Example

Walk along a segment with A+t(B-A).

highlighted = computed this step

Step 1 — Set up

Set up the exact input values.

segment and t((1, 1), (5, 3), 1/2)\begin{array}{c|c}\text{segment and t}&\text{((1, 1), (5, 3), 1/2)}\end{array}
Parametric segmentA point found from A+t(B-A).AB

Step 2 — Direction

Compute the highlighted value.

B-A(4, 2)\begin{array}{c|c}\text{B-A}&\hlmath{\text{(4, 2)}}\end{array}
Parametric segmentA point found from A+t(B-A).AB

Step 3 — x coordinate

Compute the highlighted value.

x3\begin{array}{c|c}\text{x}&\hlmath{\text{3}}\end{array}
Parametric segmentA point found from A+t(B-A).AB

Step 4 — y coordinate

Compute the highlighted value.

y2\begin{array}{c|c}\text{y}&\hlmath{\text{2}}\end{array}
Parametric segmentA point found from A+t(B-A).AB

Step 5 — Result

Compute the highlighted value.

P(t)(3, 2)\begin{array}{c|c}\text{P(t)}&\hlmath{\text{(3, 2)}}\end{array}
Parametric segmentA point found from A+t(B-A).ABP
parametric-segment A parametric segment writes every point as A+t(B-A), so the same exact t value can later describe where a clipped line enters or exits.