# The Meij Theorem

### Context

This theorem plays a small but important part in my projection method of a 3D model to the screen. See the Functional description of tree package, which is part of the documentation accessible from the documentation link on the home page.

### Theorem

Let Σ and Π be two planes at a distance δ > 0, let r and q' be vectors on the Π plane and let p' be a vector which is on the same side of Π as Σ. Let p'' be the intersection of the line from r to p' with the Σ plane.
Define qα = p' + α (q' - p') with 0 <= α < 1.
Let q'' be the intersection of the line from r to qα with the Σ plane.
Then q'' - p'' = c (q' - r) for some c >= 0.

### Proof

Consider an orthonormal base such that (x, y, z) = (x, y, -δ) for the Π plane and (x, y, z) = (x, y, 0) for the Σ plane.

Let δp be the distance that we have to travel to get from the Σ plane to p' so δp can be negative but at least δp > - δ.

Since p'' = p' + λ (r - p') is in the Σ plane, taking the z coordinates:

δp + λ (-δ - δp) = 0 so λ = δp / (δ + δp). It follows that p'' = p' + δp / (δ + δp) (r - p').

Consider qα = p' + α (q' - p'). We search q'' = qα + λ (r - qα) in the Σ plane, or (p' + α (q' - p')) + λ (r - (p' + α (q' - p'))) in the Σ plane. Again, taking the z coordinates:

p + α (-δ - δp)) + λ (-δ - (δp + α (-δ - δp))) = 0 so λ = (δp - α (δ + δp)) / ((1 - α) (δ + δp)).

Now we can express q'' in terms of p', q' and r using only constants and α, δ and δp. If you do this you will find that

q'' = δ / (δ + δp) p' +
+ α δ / ((1 - α) (δ + δp)) q' +
+ (δp - α (δ + δp)) / ((1 - α) (δ + δp)) r

Likewise

p'' = δ / (δ + δp) p' +
+ δp / (δ + δp) r

So q'' - p'' = α δ / ((1 - α) (δ + δp)) (q' - r)

which is what we set out to prove.