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:
Here is the shear coefficient. These articles explain why we can choose
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 as "the new horizontal coordinate"; the prime simply distinguishes new coordinates from old ones. is the distance from to , for example ; means multiplying five copies of .
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 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.
How Shear Changes Coordinates
Understand shear through diagrams and see how it can reverse order.
Integer Scaling and Intersection Denominators
Derive an upper bound on intersection denominators step by step from two linear equations in two unknowns.
Event Spacing and the Shear Coefficient
Derive the order-preservation condition from gaps between fractions, and explain the fifth power and the constant 256.
Equal Horizontal Coordinates, Degenerate Inputs, and Original Coordinates
Handle vertical segments and degenerate inputs, and explain why the same coefficient works before and after scaling.
Why Shear Preserves Intersections
Use the inverse formula and similar triangles to explain how intersection points and complete overlap intervals are preserved.