Example
Clip a parametric line segment to a rectangular viewport.
highlighted = computed this step
Step 1 — Parametric line
Set up the exact input values.
A, B, B-A((0, 2), (6, 5), (6, 3))
Step 2 — Entering t
Compute this boundary parameter.
t enter1/6
Step 3 — Entering point
Compute the highlighted value.
enter point(1, 5/2)
Step 4 — Exiting t
Compute this boundary parameter.
t exit2/3
Step 5 — Clipped segment
Compute the highlighted value.
clipped segment((1, 5/2), (4, 4))
line-clip-to-rectangle
The same parametric segment equation from curves gives exact entering and exiting t values for clipping.