POV-Ray : Newsgroups : povray.advanced-users : Perspective projection Server Time
22 Dec 2024 16:25:01 EST (-0500)
  Perspective projection (Message 1 to 2 of 2)  
From: ediem
Subject: Perspective projection
Date: 1 Dec 2014 16:40:01
Message: <web.547cdfc544fd739e288baf2d0@news.povray.org>
Dear all,
   I am a new member and I have a question about perspective projection. In
particular I would like to insert the matrix given at this link
http://www.cs.princeton.edu/courses/archive/fall99/cs426/lectures/view/sld029.htm
and use this matrix to transform some objects but apparently it's not possible
since POVRay assumes that the last row of the transformation matrix is always 0
0 0 1 (and hence is not written). Is there any workaround ?
   Thanks in advance
     Edie


Post a reply to this message

From: clipka
Subject: Re: Perspective projection
Date: 1 Dec 2014 21:12:59
Message: <547d202b$1@news.povray.org>
Am 01.12.2014 22:38, schrieb ediem:
> Dear all,
>     I am a new member and I have a question about perspective projection. In
> particular I would like to insert the matrix given at this link
> http://www.cs.princeton.edu/courses/archive/fall99/cs426/lectures/view/sld029.htm
> and use this matrix to transform some objects but apparently it's not possible
> since POVRay assumes that the last row of the transformation matrix is always 0
> 0 0 1 (and hence is not written). Is there any workaround ?
>     Thanks in advance
>       Edie

Um... no; actually, POV-Ray only does affine transformations; 
perspective projections aren't affine, and actually this habit of 
cramming the parameters for a perspective projection into a 4x4 matrix 
requires some "creative" re-interpretation of the matrix data (that is 
to say, it's a hack), and therefore frequently leads to misunderstandings.

Perspective projection can /not/ be performed by applying a standard 
vector-matrix multiplication.

(Actually, even the use of matrices for non-linear affine transformation 
in 3D space is a hack, using an extension into 4D-space, but at least 
the transformations from 3D to 4D and back from 4D to 3D are as trivial 
as can be.)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.