POV-Ray : Newsgroups : povray.off-topic : Viewing frustum question : Re: Viewing frustum question Server Time
4 Sep 2024 11:16:22 EDT (-0400)
  Re: Viewing frustum question  
From: Darren New
Date: 13 Feb 2010 13:22:59
Message: <4b76ee03$1@news.povray.org>
Warp wrote:
> Darren New <dne### [at] sanrrcom> wrote:
>> As far as I can figure, there's no way to represent near and far clipping 
>> planes in a transformation matrix, right? The camera itself (in some sense) 
>> has to carry them along separately?  I.e., the near and far clipping planes 
>> don't get represented anywhere in a normal 4x4 transformation matrix?
> 
>   If you think about it, how could it ever work?

Hence the "as far as I can figure."  But such math is not one of my strong 
points.

The graphics library I'm exploring has a "Matrix" class, but since it's 
compiled, I can't see the implementation. The same "Matrix" class is used to 
represent the camera's position. I figured the extra fields must actually be 
stored separately, but the high-level-ness of the library made it look like 
maybe I was wrong. (For example, the graphics card calls a matrix a 
"float4x4" implying there are just 16 floats in the structure.)

>   Now, how would you apply a "clipping plane" to a point? 

I thought perhaps it would map to 0 or infinity or something, but I was 
pretty sure I was right.

> Multiplication doesn't make a point disappear. (It
> doesn't even make much sense in that context.)

Thanks for the confirmation.

>   (Of course in practice you seldom clip individual points. In practice
> what get clipped are lines and polygons, which is a whole different
> issue which can certainly not be solved via a single matrix multiplication.)

I think on the *graphics* card, the individual points might get clipped if 
the triangle goes from inside the frustum to outside.

>   If what you are asking is whether a 4x4 matrix could carry clipping
> plane coorinates inside itself without affecting the transformation
> otherwise, I'd say that's not possible. I don't think it could carry
> that much information.

That was my suspicion too, but I wanted to confirm I was right.

I even tried making two matrix-class instances, one with a clipping plane 
and one without, and got back the same entries for the 4x4 part of the matrix.

Thanks for confirming my understanding!


-- 
Darren New, San Diego CA, USA (PST)
   Forget "focus follows mouse." When do
   I get "focus follows gaze"?


Post a reply to this message

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