• 10
• 12
• 12
• 14
• 16

# Projection Matrix

This topic is 3388 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Does anybody know of a good book or tutorial that explains the how the projection matrix is derived? Im reading about it in frank lunas book, but im having some trouble understanding some parts of it. I understand the X and Y projection fine, but the Z calculation is confusing me. He comes up with the formula, Uz + V, to normalize the z values Un + V = 0 //near Uf + V = 1 //far but where does that Uz + V, formula come from? He then says that he will use U + v/z instead because of the divide by w after the matrix multiplication, how does he come to this formula? is it becuase: 1/w * Uz + V = Uz/w + V/w = Uz/z + V/z = U + V/z Thus you just use that instead? I also niticed that with Uz + V, you can map negative near planes and positive far planes to 0-1, but with U + v/z, you cant, it doesnt work, why is this? Not that you would ever have a negative near plane. And finally, how did they determine where to place the z normalisation components in the matrix? Was the goal to just find a place so that the final outcome was

f           fn
---   -    -------
f-n        z(f - n)

for the z compoent of the vector?

zf          fn
---   -    -------
f-n        (f - n)

after the matrix multiplication

zf           fn                         f           fn
---   -    -------         ------->      ---   -    -------
zf-n        z(f - n)                     f-n        z(f - n)

after the divide by w
which was the formula for U + v/z