Mathematics Asked on February 22, 2021
So in the textbook, we want to map $(x,y,z,1)$ to $big(frac{x}{1-frac{z}{d}}, frac{y}{1-frac{z}{d}}, 0, 1big)$. Since we are working with homogenous coordinates, this is the same thing as mapping $(x,y,z,1)$ to $(x,y,0,1-frac{z}{d})$. It can be shown the perspective matrix to map this is:
$$P = begin{bmatrix}
1& 0& 0 & 0 \
0& 1& 0 & 0 \
0& 0& 0 & 0 \
0& 0& -1/d & 1 \
end{bmatrix}$$
Now, what I was wondering was if I could just map it from $(x,y,z,1)$ to $big(frac{x}{1-frac{z}{d}}, frac{y}{1-frac{z}{d}}, 0, 1big)$ which gives:
$$P = begin{bmatrix}
frac{1}{1-frac{z}{d}}& 0& 0 & 0 \
0& frac{1}{1-frac{z}{d}}& 0 & 0 \
0& 0& 1 & 0 \
0& 0& & 1 \
end{bmatrix}$$
The final homogeneous vector by applying $P$ to $(x,y,z,1)$ is the same but clearly the matrices $P$ are different. Is there anything fundamentally wrong with doing what I did and have a matrix in terms of the input $z$?
The matrix of your transformation cannot depend on the point, it has to be a constant matrix. There is a one to one correspondence between matrices and transformations (for any given basis).
Correct answer by GReyes on February 22, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP