Skip to main content

Choosing and Proving a Shear Coefficient

A sweep line processes segment endpoints and intersections from left to right. When vertical segments occur, we can tilt the figure slightly: keep the coordinate axes fixed, leave each point's height unchanged, and add a fixed multiple of its height to its horizontal coordinate. Alternatively, we can keep the geometric points fixed and describe them in an oblique coordinate system.

This transformation is called a shear:

x′=x+sy,y′=y.\teachViolet{x'}=x+sy,\qquad \teachViolet{y'}=y.

Here ss is the shear coefficient. These articles explain why we can choose

s=1256(M+1)5.\boxed{s=\frac{1}{256(M+1)^5}}.

We must distinguish two things: exact rational arithmetic and an invertible transformation keep intersection results correct; a sufficiently small coefficient prevents the original horizontal order of events from reversing. Only the latter requires the bounds below.

These articles use only fractions, absolute values, inequalities, and pairs of linear equations in two unknowns. Read x′x' as "the new horizontal coordinate"; the prime simply distinguishes new coordinates from old ones. ∣a∣|a| is the distance from aa to 00, for example ∣−3∣=3|-3|=3; M5M^5 means multiplying five copies of MM.

Keep in mind the two questions the proof must answer: How far apart must two events originally be horizontally? By how much can the shear reduce that distance? If the reduction is less than the original gap, their left-to-right order cannot reverse. We will calculate MM from the input endpoints below; it is not an arbitrarily chosen constant.

Read in order​

The first four articles choose the coefficient and prove that it preserves order. The fifth separately explains why shear preserves intersections. Each article retains the full derivation; use the previous and next links at the bottom to continue.