Skip to main content

Why Shear Preserves Intersections

The preceding articles proved that a sufficiently small coefficient prevents event order from reversing. This article answers a different question: why does a shear neither lose nor add intersections? We use only x′=x+syx'=x+sy and y′=yy'=y, with no restriction on the size of ss.

Why shear neither loses nor adds intersections​

A shear can also be undone exactly:

x=x′−sy′,y=y′.x=\teachViolet{x'}-s\teachViolet{y'},\qquad y=\teachViolet{y'}.

Substituting x′=x+syx'=x+sy and y′=yy'=y into the inverse formula gives x′−sy′=x+sy−sy=xx'-sy'=x+sy-sy=x, and the vertical coordinate returns to yy as well. Each new position therefore has a unique original position; two different positions cannot be squeezed into the same position.

However, showing that the transformation can be undone is not enough. We must also check that the sheared points of a segment form the entire segment between the new endpoints.

Let a segment have endpoints A=(ax,ay)A=(a_x,a_y) and B=(bx,by)B=(b_x,b_y). Traveling from AA toward BB by a fraction uu of the full length, with 0≤u≤10\le u\le1, reaches the point with coordinates

x=(1−u)ax+ubx,y=(1−u)ay+uby.x=(1-u)a_x+ub_x,\qquad y=(1-u)a_y+ub_y.

Here ax,aya_x,a_y are just the horizontal and vertical coordinates of endpoint AA; the subscripts do not mean multiplication. The same applies to bx,byb_x,b_y. Why can both coordinates be calculated using the same fraction? For a segment that is neither horizontal nor vertical, travel along it to a point and draw lines parallel to the horizontal and vertical axes. This creates a smaller right triangle similar to the right triangle for the whole segment. Corresponding sides of similar triangles are proportional, so the horizontal and vertical changes are also uu times the full changes. For a horizontal or vertical segment, only one coordinate changes, and the same conclusion holds.

Thus the horizontal coordinate starts at axa_x and increases by u(bx−ax)u(b_x-a_x). Expanding gives

ax+u(bx−ax)=ax+ubx−uax=(1−u)ax+ubx.a_x+u(b_x-a_x)=a_x+ub_x-ua_x=(1-u)a_x+ub_x.

The vertical coordinate works in the same way. This gives the point formula above. For example, u=0u=0 gives AA, u=1u=1 gives BB, and u=1/2u=1/2 gives the midpoint. Letting uu range from 00 to 11 gives the entire segment.

Shear this point by substituting the expressions for x,yx,y and expanding:

x′=x+sy=(1−u)ax+ubx+s((1−u)ay+uby)=(1−u)(ax+say)+u(bx+sby),y′=(1−u)ay+uby.\begin{aligned} x'=x+sy &=(1-u)a_x+ub_x+s\bigl((1-u)a_y+ub_y\bigr)\\ &=(1-u)(a_x+sa_y)+u(b_x+sb_y),\\ y'&=(1-u)a_y+ub_y. \end{aligned}

The sheared endpoint coordinates are exactly A′=(ax+say,ay)A'=(a_x+sa_y,a_y) and B′=(bx+sby,by)B'=(b_x+sb_y,b_y). The x′,y′x',y' above therefore describe the point reached by traveling from A′A' toward B′B' by a fraction uu of the full length. Letting uu range from 00 to 11 still gives the entire new segment, with no intermediate points missing. The formula holds even when A=BA=B; in that case every value of uu gives the same point.

We can now explain, one case at a time, why the intersection is preserved:

  • An original common point belongs to both segments. After shearing, it belongs to both new segments, so an existing intersection point cannot be lost.
  • If two new segments have a common point, every point of either new segment comes from its original segment. The common point must therefore come from a point on the first original segment and from a point on the second. The inverse formula recovers only one position, so those two original points must coincide. The original segments already had a common point; no new intersection has appeared from nowhere.
  • If the originals overlap over a segment, all points of the overlap transform together into a complete new segment. Applying the inverse formula recovers the original complete overlap segment.

If uu is allowed to be any real number, the same point formula describes the entire extended line. Lines therefore remain lines, and collinear points remain collinear. If two distinct parallel lines intersected after shearing, undoing that intersection would produce an intersection of the original lines, a contradiction. Parallelism is therefore preserved as well.

With exact rational arithmetic, these additions and multiplications always operate on numerators and denominators. For example, 1/3+1/6=1/21/3+1/6=1/2, without first truncating 1/31/3 to a finite decimal. There is therefore no floating-point rounding error, and the inverse shear restores results to the original coordinates. Geometrically coincident inputs still retain their separate original input identities.

Invertibility holds for any rational coefficient; the small coefficient used here additionally preserves event order. Do not mistake "sufficiently small" for the source of exactness.