PDA

View Full Version : [HOWTO] Perspective to Parallel Canonical View Vol


ajit_kamat
07-04-2005, 02:31 AM
Hi,

How is the perspective canonical view volume transformed to parallel canonical view volume? I am interested in the step-by-step (if possible) tutorial on how the following matrix is derived:

[...1...0...0......................0............... ...............]
[...0...1...0......................0............... ...............]
[...0...0...1/(1 - zmin)....-zmin/(1 - zmin)....]
[...0...0...-1.....................0........................... ...]

(The dots in the above matrix are to maintain formatting of the matrix :))

where zmin = -(_VRPz + F) / (_VRPz + B)

_VRPz = z component of View Reference Point after translating the Perspecfive Reference Point to origin and shearing the view volume such that the "center line" of view volume is parallel to the z-axis.

F is front plane and B is the back plane.

This is from the Computer Graphics book by Dr. Foley et.al (Chapter 6).

In that book the derivation of this matrix is not explained and I want to know how this is done.

BTW, what does the following equation mean and how is this derived:

z' = A + (B / z)

The eqaution is used in the book Computer Graphics using OpenGL by Prof. Hill Jr.

Cheers,

~Ajit

anubis
07-04-2005, 07:45 AM
http://www.ece.eps.hw.ac.uk/~dml/cgonline/...persptrans.html (http://www.ece.eps.hw.ac.uk/~dml/cgonline/hyper00/polypipe/projection/persptrans.html)

ajit_kamat
07-04-2005, 09:59 PM
Thanks anubis, but then again how is the following equation derived:

z' = A + (B / z)

Cheers,

~Ajit

Reedbeta
07-05-2005, 08:29 AM
What's the context of the equation z' = A + (B / z)? I.e. what are the z', z, A, and B?

ajit_kamat
07-05-2005, 08:30 PM
Hi Reedbeta,

Consider the Perspective Canonical View Volume (CVV) to Parallel CVV transformation.
z' is the transformed value of z from perspective CVV to parallel CVV (thats my understanding).

z' = A + (B / z)

A proper illustration for values of A, B, z and z' is given in the link provided by anubis above. (I am not able to draw the figures here)

I want to know how the above equation was derived.

Thanks and regards,

~Ajit